Robert Carter Jr. had been a staple of consistency through the Terrapins men’s basketball team’s first eight games. The forward reached double figures in each game and shot less than 50 percent in just one contest.

But over the past three games, Carter saw a slight dip in his production. He scored eight points in back-to-back contests before recording 12 against Princeton on Dec. 19.

In the Terps’ first game in eight days Sunday afternoon, Carter dominated. The redshirt junior poured in 19 points as the No. 4 Terps cruised to an 87-67 win in front of an announced sellout crowd at Xfinity Center in their final bout before conference play begins Wednesday.

Carter got some help from center Diamond Stone, who came off the bench for the fifth straight game. The freshman continued to provide an offensive spark as he finished with 16 points on 8-for-10 shooting.

The Terps (11-1) had six players score at least eight points as they shot 51.5 percent from the floor, including 13-for-27 from beyond the arc.

Forward Jake Layman, who seemed to find his touch against Princeton with a season-high 19 points, failed to carry over that momentum in the early going. The senior attempted just one shot in the first half and didn’t score until the 11:51 mark in the second half.

Coach Mark Turgeon seemed to try to get him involved early in the second half with some looks in the post, but Layman couldn’t turn them into points. Once he did score on a pair of free throws, though, he buried a couple 3-pointers and finished with eight points.

Part of the Terps’ success stemmed from their stout defense. Turgeon’s squad held Marshall’s leading scorer, forward James Kelly, to 10 points on 4-for-13 shooting. The Thundering Herd (4-9), meanwhile, shot just 35.1 percent from the floor.

After the Terps converted their first two shots, they missed seven straight to allow Marshall (4-9) to jump out to a 9-5 lead. But the Terps responded by making eight of their next nine shots as part of an 18-2 run.

The Thundering Herd would respond with a spurt of its own later in the period to chip away at the Terps lead. Marshall rattled off 12 straight points to cut the deficit to one.

Carter wouldn’t let Marshall reclaim the lead, though. The 6-foot-9 forward stepped into a pass from guard Melo Trimble and buried his second 3-pointer of the game with 4:55 left in the first half.

The Terps would end the opening 20 minutes on a 9-0 run capped by a floater from guard Rasheed Sulaimon, who finished with 14 points, in the final seconds to push their lead back to double digits. Marshall wouldn’t get any closer the rest of the way.

Powered by Stone layups and Carter hook shots, the Terps pulled away in the second half for the convincing victory.