LINCOLN, NEBRASKA — With the Nebraska faithful roaring late in the second half at Pinnacle Bank Arena, the Terrapins men’s basketball players trudged to the sideline with their heads bowed.

Minutes earlier, the Terps had held a five-point advantage. But the Cornhuskers responded, using a 7-0 run to take their first lead of the second half, 54-51, with 8:29 remaining. So Terps coach Mark Turgeon burned a timeout. The crowd kept standing, trying to will the Huskers to victory.

But as loud as their fans cheered, the Cornhuskers couldn’t guard Melo Trimble. The Terps’ star guard hit a 3-pointer out of the timeout, and another one moments later with the crowd still roaring. The Big Ten Preseason Player of the Year then gave the Terps a lead with a free throw before finding center Diamond Stone for a dunk.

While Trimble didn’t dominate in the first half Wednesday — he scored six points, recorded one assist and coughed up three turnovers -— he delivered when the Terps needed him. Trimble’s game-high 20 points helped the No. 4 Terps hold off a pesky Cornhuskers team and capture a 70-65 win last night at Pinnacle Bank Arena. The Terps survived despite committing 18 turnovers.

With 30 seconds left in the first half, Trimble was pulled after a turnover. Even Trimble admitted he didn’t play well in the first half, flashing his customary smile. Turgeon never lost faith in his star, though, and Trimble responded in the second half.

“You’ve just got to smile and give him a hug and know he’s going to do what he does,” Turgeon said. “He’s a winner. He just keeps doing it.”

Nebraska guard Andrew White III had 19 points in a losing effort, while Stone was two blocks away from a triple-double. The freshman finished with 16 points, 10 rebounds and eight blocks, including a block with 18 seconds left. Terps forward Jake Layman had four of his six points in the last three minutes.

Trimble was the star, though. The Cornhuskers couldn’t get the ball out of the point guard’s hands late — “It’s almost impossible,” White said — and Trimble sealed the win with two free throws with seven seconds left.

After that rough first half, Trimble drew on Turgeon’s confidence in him.

“He believes in me in any situation,” Trimble said. “After that first half, he still believed in me.”

While Nebraska (12-11, 4-6 Big Ten) entered the game in the middle of the conference standings, they had already secured a win over a top-15 team this season. On Jan. 20, the Cornhuskers prevailed, 72-71, over then-No. 11 Michigan State.

So the Cornhuskers weren’t intimidated last night. They jumped out to a five-point lead less than five minutes into the game, and the Terps (20-3, 9-2) never could pull away despite leading for more than 27 minutes.

Foul trouble didn’t help. Forward Robert Carter Jr. had four fouls and never got in a rhythm; he played just 16 minutes. Stone, forward Damonte Dodd and guard Rasheed Sulaimon all finished with three fouls, too.

Despite holding the Cornhuskers to less than 30 percent shooting in the opening period, the Terps held a 29-28 lead at the break, as they coughed up 13 turnovers and endured a five-minute-plus scoreless drought.

The team committed five turnovers during that stretch, including a giveaway by center Michal Cekovsky that led to a rim-rattling alley-oop to knot the game at 27. Minutes later, the normally sure-handed Trimble lost control of the ball and let it trickle out of bounds.

Turnovers and foul trouble continued to plague the Terps in a back-and-forth second half. While the Terps extended their lead to five within the first four minutes of the period, they again couldn’t pull away.

“Nebraska’s a great team,” Stone said. “They played amazing defense on us, and for us to overcome that and pull out the victory, that shows toughness on our part.”

A 3-pointer from White jump-started a 7-0 Cornhuskers run and forced Turgeon to call a timeout with 8:29 left and the Terps down 54-51.

That’s when Trimble took over, with a little help from Stone and Layman.