Terps LB Demetrius Hartsfield (9, right) after WVU WR Tavon Austin (1, left) scores his third TD of the game in the fourth quarter to put the Mountaineers up 30-14. Charlie DeBoyace/The Diamondback

MORGANTOWN, W.Va. — The Terrapins football team was supposed to get blown out Saturday.

The Terps were 27.5-point underdogs playing the No. 8 team in the country at hostile Milan Puskar Stadium. They had a true freshman quarterback under center, a redshirt freshman starting at running back and a slew of inexperience surrounding them all over the field. And they just lost to a middle-of-the-road Connecticut team one week ago.

They lost again Saturday, 31-21, to West Virginia, but it wasn’t in the disappointing fashion many predicted going into the game

“The guys fought hard,” coach Randy Edsall said after the game. “But, you know, the bottom line is we came up a little bit short and we will just keep getting better and keep working to make ourselves better.”

The Terps were within striking distance throughout the game, though. After a fumble return and a 44-yard touchdown pass from Mountaineer quarterback Geno Smith to wide receiver Tavon Austin gave West Virginia an early 14-point cushion, the Terps got back into it.

Wide receiver Stefon Diggs scored on a 42-yard catch and run at the end of the first quarter and Hills hit Marcus Leak in the endzone early in the second quarter, tying the game at 14 early.

But Leak’s score was the team’s last until midway through the fourth quarter. Mountaineer kicker Tyler Bitancourt made a field goal midway through the second quarter and Austin caught long touchdown passes in the third and fourth quarters, pushing the Terps’ deficit to 17.

Diggs caught another touchdown in the fourth quarter, but it was too little too late. Two of the Terps’ final three drives ended in turnovers, sending the team back to College Park with a 10-point loss.

“I disappointed that we made some of the errors that we made that didn’t allow us to have an opportunity to win toward the end of the game,” Edsall said. We have to do a better job of securing the ball offensively.”

Quarterback Perry Hills put on the best performance of his young career against the Mountaineers, completing 20 of his 29 pass attempts for 305 yards and three touchdowns. He did still have two turnovers though, losing a fumble that was returned for a touchdown and throwing an interception on fourth and 21 that ended the Terps final possession of the afternoon.

“Things are definitely starting to slow down for me,” Hills said. “It’s just a matter of getting the ball out of my hands faster.”

The defense stood up, too. Facing a team that averaged 612 yards and 55 points per game through its first two contests, the Terps held West Virginia to only 363 yards and 31 points. They also sacked Smith twice, the first two times he had been sacked all season.

“It’s bittersweet, because we were in the game,” linebacker Demetrius Hartsfield said. “If you take a couple plays out, we’re up.”

But despite some positive aspects, the Terps dropped their second straight game and their seventh straight to the Mountaineers. It’s a disappointing result, especially for a team that put on arguably its best performance of the season.

“There are no moral victories,” Edsall said. “We don’t play the game and put in the time and effort we get into to walk away feeling good. We lost, and it just takes another chunk out of you.”

vitale@umdbk.com