With the Terrapins leading by a point, a blocking foul on Jerome Meyinsse sent Cavaliers coach Tony Bennett into a momentary rage. The first-year coach peeled his jacket off and threw it, and was called for a technical foul that essentially rescued the Terps.
Greivis Vasquez finished with 23 points, including both free throws on the technical with 38.6 seconds to play, and Sean Mosley added two more right after as Maryland held on, 74-68.
Maryland was 8 for 8 from the foul line in the final 38.6 seconds.
"Heck of a time to get the first technical foul of my career, that's for sure," Bennett said, somewhat sheepishly. "I saw the referee wasn't looking and I took my jacket off and threw it down. ... It's a hard game to swallow. I feel bad about it, though, I really do."
The Terrapins (23-7, 13-3 ACC) clinched at least a tie for the conference regular-season title with their seventh victory in a row, but let a Cavaliers team playing without suspended scoring leader Sylven Landesberg cut an 11-point deficit to one in the final minute.
The blocking call came less than a minute after Virginia's Will Sherrill drew a charge on Vasquez that incensed Maryland coach Gary Williams, helping to fuel the intense finish.
Sean Mosley said the decisive call was a difficult one.
"The refs did a great job tonight," Mosley said. "They're not going to get every call right. It was shocking to me. I had to look around and make sure they called a block."
Landesberg was suspended earlier in the day for not meeting academic responsibilities, making Virginia's performance all the more surprising, especially when Adrian's Bowie's 3-pointer made it 53-41 with 12:18 to play.
The Cavaliers, after all, had lost eight straight, the last six by double digits.
"I think guys just said, 'Screw it. We have nothing to lose,"' Sherrill said.
That attitude, combined with Maryland putting the game into cruise control, produced a stirring comeback, and then a 3-point shooting duel with the Cavaliers matching Vasquez.
"I think we got a little complacent," Maryland guard Eric Hayes said. "We were playing not to lose. Coach told us that and we were able to reassert ourselves late in the game."
Meyinsse led Virginia (14-15, 5-11) with 17 points in his final home game. Jeff Jones hit 4 of 6 3-point attempts and scored 16 points, and Sammy Zeglinski had 14 with four 3s.
After Bowie's 3 put the Terps ahead 53-41, Virginia scored the next seven points, capped by Meyinsse's dunk. Dino Gregory's free throw gave the Terps a 54-48 lead, but Jones and Vasquez traded 3-pointers before Jones hit another from deep, pulling Virginia to 57-54.
"There wasn't much 3-point defense being played," Hayes said.
Hayes' driving basket pushed Maryland's lead back to five, and after Meyinsse hit a pair of free throws, Vasquez hit the first of his back-to-back 3-pointers. The second answered one by Sherrill, giving the Terps a 65-59 lead with 3:39 to play, but Virginia kept coming.
Meyinsse scored on a baby hook with 3:09 left, and after Jordan Williams' free throw for Maryland, Mustapha Farrakhan made a layup and then fed Sherrill for another after a Maryland turnover, pulling the Cavaliers within 66-65 and setting up the controversial finish.
When Sherrill drew the charge on Vasquez, the crowd of 13,431 went wild, thinking the Cavaliers were going to close their home season by beating the Terps again, like last year.
But Farrakahn turned the ball over, Mosley was fouled at the comeback fell short.
Hayes added 11 points and Mosley 10 for Maryland.
Maryland led 21-9 after 8½ minutes and had outrebounding the Cavaliers 14-1. Virginia finally found some rhythm offensively, pulling within 28-20, but a 10-4 run by the Terps allowed them to push their lead to 38-24 before Zeglinski closed the half with a 3-pointer.