Maryland tight end Dave Stinebaugh’s only catch Saturday came late in the fourth-quarter, a 12-yard touchdown that ended up being the game-winner. (Ricky Carioti/The Washington Post)

The Maryland football players rushed the field with mixed emotions, part celebration and part disbelief, because something finally broke their way. Moments like these do not often happen to the Terrapins. Injuries happen. Bad luck, too. But this? This felt new.

“I couldn’t believe it,” linebacker L.A. Goree said. “That doesn’t seem real. That doesn’t happen to the Terps.”

Virginia place kicker Alec Vozenilek’s 42-yard field goal attempt with 10 seconds left sailed wide right Saturday, and Maryland exhaled, a 27-26 nail-biter etched in the books. The Terrapins (5-1, 1-1 ACC) tossed their helmets toward the dark sky and mobbed one another at midfield. They ran into the locker room having bounced back from their worst loss in two decades.

They thought about the last time Caleb Rowe played quarterback at Byrd Stadium, when inches also meant the difference between triumph and heartbreak.

Last season against North Carolina State, Rowe entered the game and nearly led the Terrapins to a comeback win. But Brad Craddock’s last-second field goal attempt struck the left upright. A similar script unfolded after dusk Saturday, with Rowe making just his second career start after C.J. Brown’s concussion left him signaling plays on the sideline.

“The tables were turned this time,” Rowe later said. “It’s a great feeling to win. I’ll go ahead and say that.”

Rowe’s career highlights have been few and far between, but the escape act the sophomore summoned Saturday will top them all.

Midway through the fourth quarter, a botched option pitch and incomplete pass had the Terrapins facing third-and-long, down six points with their ACC home opener slipping away.

Then Rowe, making just his second career start, dropped back, danced right and heaved a prayer downfield, deep into double coverage.

Wide receiver Deon Long fell backward with the ball clinging to his helmet for a 47-yard gain, and momentum finally seemed headed Maryland’s way. Two plays later, Rowe sidearmed a bullet toward sliding tight end Dave Stinebaugh, who never expected the pass to come from that angle but held on for a 12-yard touchdown to give the Terps the lead for good.

“Well, that’ll make you feel a few years older,” Coach Randy Edsall began his news conference by saying. “But I’ll take it.”

Without Brown’s scrambling abilities, Maryland needed an established running game to take pressure off Rowe and help the Terrapins rebound from their 63-0 loss at Florida State last weekend.

Running back Brandon Ross delivered. He had 14 carries for 88 yards and two early touchdowns that helped the Terps keep pace.

The Cavaliers (2-4, 0-2), themselves reeling after losses to Pittsburgh and Ball State, answered by driving deep into Maryland territory. They had been there twice in the first quarter but mustered only field goals. On third down, quarterback David Watford ad-libbed a bootleg, pulling up just short of the line of scrimmage and finding tight end Jake McGee (eight catches, 114 yards) for a five-yard score. After the extra point, Virginia had pulled within one, and a chip-shot field goal with eight seconds left gave it the lead entering intermission.

The lead seesawed after halftime as the final in-conference game between these bitter border-state rivals only could. Virginia scorched a Maryland linebacking corps decimated by injury — Matt Robinson likely will miss three to four weeks with a shoulder injury, and two more left Saturday’s game with ailments — and finished with 505 yards. A six-yard touchdown rush by Kevin Parks put Virginia up 23-20 early in the final quarter, and after Vozenilek’s fourth — and ultimately final — field goal of the game, the Cavaliers were up by six points.

Then Rowe entered again. Maryland fell short with him at the helm last season, and were it not for Long’s leap it might have happened again. But as these Terps celebrated in the locker room, they felt, for the first time in years, like luck finally went their way.

“The way it ended, it couldn’t have ended any better for us,” Edsall said. “Our guys kept battling. I thought they would battle, but I was very, very concerned because of what took place a week ago. Until you go back out and play again, I don’t think you ever know what will happen.”