COLLEGE PARK, Md. -- With Maryland's starting quarterback out, sophomore Caleb Rowe played the role of hero, passing for 332 yards and a late touchdown as the Terrapins pulled out a 27-26 win over Virginia on Saturday in an Atlantic Coast Conference game.
The 78th and perhaps final meeting of the border rivals wasn't decided until Alec Vozenelik's 42-yard field goal with 10 seconds remaining went just wide right.
The Terrapins (5-1, 1-1) are in their final season in the ACC before moving to the Big Ten next year.
Rowe, playing for injured C.J. Brown, completed 18 of 34 passes in his second career start and his first this year. Rowe guided the Terps 69 yards in six plays on the winning drive, hitting tight end Dave Stinebaugh for a 12-yard score with 5:14 remaining.
"This wasn't just about this week," said Rowe, who had thrown just 24 passes all season -- 17 last week after Brown left the Florida State game with a concussion. "I've been preparing like a starter all season. I thought I really settled down in the second half."
Rowe had to settle down and step up. The wild ACC game featured five lead changes and a ton of big plays. Maryland amassed 468 total yards and Virginia had 505.
The Cavaliers (2-4, 0-2) moved 49 yards on their final possession behind quarterback David Watford, who completed 27 of 44 passes for 263 yards in the game.
The Terrapins also had to overcome a powerful Virginia running game. Tailbacks Kevin Parks and Khalik Shepherd combined for 193 of Virginia's 242 yards rushing.
Parks, who had 119 yards on 28 carries, scored from 6 yards with 13:15 left in the fourth quarter to put the Cavaliers (2-4, 0-2) ahead. Shepherd finished with 10 carries for 81 yards.
Vozenilek's 26-yard field goal, his fourth of the day, put Virginia up 26-20 with 7:11 to play.
The Cavaliers were stymied in the red zone much of the day, with the Terrapins coming up with big stops, including holding Virginia to a field goal after a first-and-goal at the 6-yard line at one point in the first quarter.
"When you get down in the red zone, you want to score points, but you want to get touchdowns, preferably," Virginia coach Mike London said. "If you don't, then you have to get those three point opportunities.
"When you look at it, only three points didn't add up enough. One more score in the red zone obviously could have been the difference in the game."
Rowe's heroics, including a third-and-21 completion to Deon Long on Maryland's winning drive, offset the Virginia ground onslaught.
"We talk about the missed field goal at the end, but third-and-21 like that -- you get off the field," London said. "You've got to go up and make that play and it's a whole different story."
The Cavaliers led 16-14 at the end of a see-saw first half.
Virginia, hoping to snap a two-game losing streak, jumped to a 6-0 lead on two Vozenilek field goals.
The Terrapins, coming off last week's 63-0 humiliation at Florida State, bounced back with a big play at end of the first quarter when tailback Brandon Ross turned a screen pass into a 77-yard gain. Two plays later, he leapt into the end zone for a 7-6 lead with 1:04 left in the quarter.
Rowe drove the Terrapins 88 yards in six plays midway through the second quarter. Ross took a pitch and scooted into the end zone from 7 yards for 14-6 lead with 6:40 left in the second quarter. Ross led Maryland with 88 yards on 14 carries.
"I thought Caleb Rowe came in and did a really good job," said Maryland coach Randy Edsall, who saw the Terrapins snap a three-game Virginia winning streak at Capital One Field at Byrd Stadium. "He made some mistakes, but he did what he's supposed to do -- he led his team to victory."
Virginia came back with an 81-yard drive. Watford found tight end Jake McGee for a 4-yard touchdown with 4:33 left in the first half. McGee finished with eight catches for 114 yards.
Parks made a big play in the two-minute drill, turning a screen into a 35-yard gain, and Voznelik's 27-yard field goal with 19 seconds left before halftime put the Cavaliers back in front.
Maryland regained the lead at 17-16 to start the second half when Brad Craddock kicked a 36-yard field goal.
"This was so big for us to bounce back after Florida State," Maryland nose tackle Darius Kilgo said. "It says a lot about the guys on this team. It was a dogfight."
Parks added five receptions for 50 yards, including two catches on the final drive to set up the field goal attempt.
Stefon Diggs led Maryland with six receptions for 96 yards, including a 39-yarder on a pass intended for another receiver that he caught off a deflection by Virginia cornerback Tim Harris.
NOTES: Brown is still suffering the effects of the concussion he suffered last week at Florida State. ... Virginia senior DT Keith Urban left the game in the first half on a cart with a leg injury. ... Maryland junior LB Matt Robinson (shoulder) also missed the game and his replacement, Alex Twine, left in the third quarter with a shoulder injury.