Mark Donnal came down with the game's biggest rebound, and as Maryland players tried to take the ball away, a whistle blew.
"It's a little bit of a relief," Donnal said.
Donnal's crucial offensive rebound -- and the timeout called by a teammate -- allowed the Wolverines to keep the ball with the shot clock off, and Michigan held on for a 70-67 victory over No. 3 Maryland on Tuesday night.
Rasheed Sulaimon missed a 3-point attempt in the final seconds, ending the Terrapins' nine-game winning streak.
Zak Irvin scored 22 points for the Wolverines, and Derrick Walton had 12 points and 10 rebounds. It was Walton who called for the timeout with 14 seconds left after Donnal's offensive rebound.
"He was in a really tight spot ... he was like, on the baseline," Walton said. "I was just thinking a play ahead. Either way, if we can get the timeout, we still have the ball."
Michigan (13-4, 3-1 Big Ten) overcame 22 points and 11 rebounds by Maryland freshman Diamond Stone. The Wolverines held Maryland's backcourt duo of Sulaimon and Melo Trimble to 10 points on 4-of-17 shooting. Trimble scored only two points.
The Wolverines were without guard Caris LeVert, their leading scorer. The senior missed a third straight game with a lower left leg injury.
Duncan Robinson scored 17 points for Michigan.
Maryland (15-2, 4-1) had been an NCAA-best 15-1 in games decided by six points or fewer since 2014-15.
Michigan led by as many as 13 points in the second half, but the Terrapins came all the way back behind Stone, who scored 19 after halftime. Maryland took a brief lead at 57-56, but the Wolverines made enough big shots down the stretch.
Michigan led 67-59 after 3-pointers by Walton and Irvin, but Maryland made one last run. Stone cut the deficit to two when he made two free throws with 40 seconds left, but after Walton missed at the other end, Donnal came up with the rebound.
After the timeout, Michigan inbounded to Donnal, who was fouled. He made only one of two free throws, but Sulaimon's tying attempt from beyond the arc missed.
"We got a good look. We really did," Maryland coach Mark Turgeon said. "Think about, if we just would have come up with the rebound before that and didn't have to foul him. But we didn't."
Michigan shot 12 of 29 from 3-point range.
Jake Layman scored 18 points for the Terps, and Robert Carter added 15. Layman scored 11 points in the first half, helping Maryland stay in it despite a strong start by the Wolverines, who led 37-29 at halftime.
It was 44-33 after Donnal's layup on a fast break, and a four-point play by Walton made it 48-35.
"I think we gave them confidence in the first half. We let them get too many open 3s," Layman said. "Second half I think we played a little better on defense, contested a lot more shots. But yeah, they hit some tough shots."
PICK YOUR POISON
Michigan paid plenty of attention to Trimble and Maryland's perimeter threats, with Donnal in position to help when the Terps would set screens near the top of the key. That gave Stone room to operate inside, and the 6-foot-11, 255-pound freshman took advantage.
"We decided to just go with our regular action ... and see if they could beat us with 2s," Michigan coach John Beilein said. "And then they were really beating us with 2s."
Stone went 7 of 13 from the field and 8 of 9 on free throws.
Trimble made a 3-pointer with 1.2 seconds left to beat Wisconsin last weekend, but he was only 1 of 7 from the field Tuesday.
Maryland: The Terps were playing an away game against Michigan for the first time since 1927. ... Maryland had nine turnovers in the first half and only three in the second.
Michigan: The Wolverines' bench was outscored 22-6, but all 22 of Maryland's points came from Stone.
Maryland: Hosts Ohio State on Saturday.
Michigan: Plays at No. 16 Iowa on Sunday.
Follow Noah Trister at www.Twitter.com/noahtrister