Jake Layman scored 14 points to lift Maryland to a 60-55 victory over Virginia Tech on Thursday night.
Alex Len added 10 points for the Terrapins (17-6, 5-5 Atlantic Coast Conference), who won their second straight after losing games at Duke and at Florida State.
Len's two free throws with 58.4 seconds left gave Maryland a 56-53 lead. After Virginia Tech's Robert Brown missed a jumper in the lane, Maryland's Nick Faust hit two free throws with 28 seconds left to make it 58-53.
The Hokies (11-11, 2-7) got two free throws from Erick Green with 9.6 seconds left to cut the lead to 58-55. But Seth Allen made one of two free throws with 8.3 seconds left to seal it for Maryland.
Virginia Tech, which lost its fifth straight, got a game-high 29 points from Green, who came in leading the nation in scoring at 25.2 points per game.
The senior guard hit just 10 of 23 from the floor for the cold-shooting Hokies, who shot just 33.8 percent for the game (22 of 65). Maryland came into the game ranked fourth nationally in field-goal percentage defense at 36.3 percent.
Maryland had a balanced attack, with five players scoring more than seven points. James Padgett and Dez Wells scored eight points each and Allen had seven.
The Hokies' only other double-figures scorer was Cadarian Raines, who scored 14.