COLLEGE PARK, Md. (AP) Coming off an inspiring win over Wisconsin, Maryland sputtered at the outset against Michigan and trailed for a good portion of the first half.
The 14th-ranked Terrapins did have this going for them: They were playing at home, and that turned out to be the advantage they needed.
Melo Trimble scored 19 points, and Maryland beat Michigan 66-56 Saturday to complete an undefeated season at home in the Big Ten.
The Terrapins finished 18-1 on their own court. The only defeat came against Top 10 Virginia on Dec. 3, and they went 9-0 in league play.
''It's pretty amazing. I don't know how we did it,'' coach Mark Turgeon said. ''There were some games I'd look at the stat sheet and go, `How did we win?' The players wouldn't let us lose, the fans wouldn't let us lose. Sometimes you just have years like that. ''
The most notable of those home wins came Tuesday night against fifth-ranked Wisconsin, the conference leader. For an encore, the Terrapins had to get up for an injury-riddled Michigan team after bidding farewell to seven seniors in a pregame ceremony.
''We were flat,'' Turgeon acknowledged. ''We were emotionally spent and tired, but we just gutted it out and competed.''
A gritty defensive battle turned in the Terrapins' favor late in the first half, and Maryland (24-5, 12-4) never trailed in the final 20 minutes.
''I think we did a good job of making sure this program gets its proper recognition,'' said Dez Wells, who had 13 points, six rebounds and six turnovers in his final home game at Maryland. ''We can't write history for ourselves. It has to be done by us winning, and how we play, and our heart.''
Zak Irvin led Michigan (14-14, 7-9) with 15 points. The Wolverines went 19 for 52 from the floor, including 5 for 21 beyond the arc, in losing for the sixth time in seven games.
''It was just tough to see a lot of our shots go in and out,'' said Irvin, who missed six of 10 attempts from the field.
The Terrapins had something to do with that.
''There's a reason why they've got 24 wins,'' Wolverines coach John Beilein said. ''I'm proud that we continued to answer (but) our guys had some problems guarding their athletes and their skill level.''
Maryland let an eight-point lead shrink to 43-40 before Trimble sandwiched a pair of 3-pointers around a basket by Irvin to make it 49-42.
It was 49-44 before Wells hit a jumper and Trimble sank three foul shots for a 10-point cushion with 5:18 remaining. Soon after that, 3-pointers by Jake Layman and Wells made it 60-48.
That was enough to assure the Terrapins their fifth straight win. They won the previous four by a total of 15 points.
Maryland closed the first half with a 12-0 run for a 30-21 lead. Trimble, Layman and Richaud Pack contributed 3-pointers to the surge.
''I thought the last few minutes of the first half, that was the big difference,'' Beilein said.
Before that, the game featured four ties and eight lead changes.
Michigan shot 32 percent from the floor before the break, missed eight of nine attempts from beyond the arc and went scoreless over the final 4 minutes, 57 seconds.
Michigan: Beilein on the setting at Maryland: ''It's a tremendous atmosphere. But as you're in the Big Ten, every game is like this. ... We haven't played in front of a non-sellout it seems like in three or four years.''
Maryland: Turgeon said of the scene at home, with a capacity of nearly 18,000: ''That is why you come to Maryland, to be part of that.''
Michigan: The Wolverines played their 10th straight game without injured guards Derrick Walton Jr. and Caris LeVert. Michigan is 3-7 without them. ... The Wolverines fell to 3-4 all-time against Maryland in a series that began in 1927. ... Spike Albrecht had one assist and needs two more to go over 100 for the first time in his college career. ... Irvin has made a 3-pointer in every game this season.
Maryland: Michal Cekovsky, a 7-foot-1 forward, injured his left knee in warmups and did not play. ... It was Maryland's first double-digit win since Jan. 17 against Michigan State. ... Senior Evan Smotrycz played 69 games at Michigan before transferring to Maryland. ... None of those seven seniors started their career as scholarship players at Maryland. ... Wells has reached double figures in nine straight games and 69 for his career.
Michigan travels to Northwestern on Tuesday night.
Maryland plays at Rutgers, its first road game since Feb. 14.