Jalen Smith made a driving layup with 3.8 seconds left to break a tie, and Maryland used a late push to get past No. 24 Nebraska 74-72 on Wednesday night.
Bruno Fernando had 18 points and 17 rebounds, Anthony Cowan Jr. scored 19 points and Smith accounted for Maryland's final seven points to finish with 15.
Maryland (11-3, 2-1 Big Ten) trailed 71-70 before Smith made a follow-shot off a 3-point try by Cowan with 28 seconds left. After James Palmer converted 1 of 2 free throws for Nebraska, Smith drove the middle of the lane for his decisive layup.
Following a timeout, Nebraska (11-3, 1-2) tried to work the ball up the court before Ricky Lindo Jr. knocked away a pass under the basket.
Palmer scored 26 points and Glynn Watson Jr. added 12 for the Cornhuskers, whose four-game winning streak ended.
The final minutes went back and forth, with neither team able to take charge.
After a three-point play by Smith put the Terps ahead 70-67 with 2:42 left, Watson made two free throws and Palmer turned a steal into a dunk for a 71-70 lead with 2:13 remaining.
That would be the last time Nebraska was in front.
The game was tied early in the second half before Maryland missed eight straight shots over a four-minute span while falling behind 47-39.
Fernando ended the drought with a layup and made another before Aaron Wiggins and Cowan drilled 3-pointers to cap a 10-2 run that tied it at 49 with 12 minutes left.
Neither team led by more than four points the rest of the way.
Getting 13 points from Palmer and sinking six shots from beyond the arc, Nebraska built a 39-35 halftime lead.
After Maryland used a 9-0 run to move in front 33-29, the Cornhuskers closed the half with a 10-2 spurt.
The Cornhuskers limited Maryland to 28-for-60 shooting. It was the 38th time in 39 games Nebraska's opponent failed to exceed 50 percent, dating to last season. Minnesota topped 50 percent on Dec. 5 in an 85-78 victory.
Nebraska: Playing on the road in a loud arena, the Cornhuskers gave a tough Maryland team everything it could handle. It was a vast improvement from Nebraska's other Big Ten game on the road against Minnesota in December.
Maryland: This was the biggest win of the year for the Terrapins, who previously lost at Purdue and at home against Seton Hall.
Nebraska faces Iowa on the road Sunday.
Maryland travels to Rutgers on Saturday. The Terps are 6-0 against the Scarlet Knights since joining the Big Ten in 2014.