One of Maryland’s main concerns heading into Saturday’s game against Virginia was whether its beleaguered rushing defense, ranked 118th among 120 Football Bowl Subdivision teams, could contain a ground game that had been effective this season.

The Terrapins’ 31-13 loss at Byrd Stadium not only supplied the answer — an emphatic “no” — but also exposed weaknesses in all facets of Maryland football.

The loss dropped Maryland to 2-7 overall, 1-5 in the ACC. And, with a losing season ensured, it eliminated the Terrapins from bowl contention in Coach Randy Edsall’s first season.

It also represented a swift and stunning fall from grace for a team that capped an 8-4 regular season in 2010 with ACC coach of the year honors for Ralph Friedgen, ACC rookie of the year honors for quarterback Danny O’Brien and a victory in the Military Bowl.

Virginia, meanwhile, appears headed in a much more promising direction. The Cavaliers (6-3, 3-2), in Coach Mike London’s second season, are eligible for a bowl game for the first time since 2007 and remain in the hunt for the ACC Coastal Division crown.

“It’s something you never imagine,” O’Brien said of the Terrapins, who will take a five-game losing streak into next Saturday’s heavily promoted showdown with Notre Dame at FedEx Field.

Said senior defensive lineman Maurice Hampton: “Honestly, this is not a 2-7 team. This is a team that’s supposed to be winning. Everybody has been working harder every week to do the right thing. Things keep happening.”

After allowing Virginia’s Khalek Shepherd to return the opening kickoff 48 yards — Maryland also entered the game ranked 118th in kickoff return defense — the Cavaliers needed all of one play to reach the end zone, as Perry Jones ran it in from 47 yards. With 20 seconds elapsed, booing broke out among the announced crowd of 37,401.

Maryland’s offense, led alternately by O’Brien and C.J. Brown at quarterback, turned over the ball five times and, on a critical drive shortly before halftime, failed to punch it in from the 2-yard line on three attempts, eliciting more jeers from the increasingly dissatisfied crowd.

The Terrapins’ defense surrendered 527 yards — a season high for Virginia and more than the Cavaliers managed against lower-division William & Mary — as well as 24 unanswered points to close the game. By then, most of the crowd had headed for the exits.

While Edsall didn’t inherit a rebuilding job when he was hired last January, it has become one on his watch, a season undermined by a rash of injuries, suspensions for unspecified infractions and instability at quarterback, the one position that was the envy of the league a year ago.

Nine games into the season, Edsall hasn’t yet decided who should be the Terrapins’ quarterback.

“I would love to just be able to play one guy; that’s what I’d love to do,” Edsall said. “Both of them have skill sets that I think can do things to help you win games.”

Saturday was the final home game for Maryland’s 15 seniors. But apart from the glorious football weather, there was little to celebrate.

O’Brien, starting for the first time in four games, engineered a promising first drive only to have a likely touchdown pass dropped.

Later, O’Brien hit Kerry Boykins with back-to-back completions of 35 and 22 yards to move Maryland to the Virginia 14. But Kevin Dorsey couldn’t hang onto a fine throw into the end zone, leaving Nick Ferrara to salvage the effort with a 24-yard field goal that cut the Terrapins’ deficit to 7-3.

With Virginia driving on the following possession, Maryland’s Joe Vellano forced a fumble that was recovered by middle linebacker Demetrius Hartsfield.

That’s when Brown took over — a move Edsall said had been planned. He and Davin Meggett ran it 67 yards between them, and Brown fired a 13-yard touchdown strike to Devonte Campbell to put Maryland up 10-7.

Edsall switched back to O’Brien, who moved the Terrapins briskly downfield late in the first half. But the drive stalled on the 1, and Maryland settled for yet another field goal to take a 13-7 lead.

The Terrapins didn’t score again.

Edsall dismissed a suggestion that all the shuffling at quarterback made it tougher for his offense to get in sync. He characterized Saturday’s blown plays as errors of execution, primarily — whether it was receivers taking their eyes off the ball or defenders missing tackles.

O’Brien, who completed 16 of 32 passes for 241 yards and two interceptions, conceded that it was difficult to go in and out of games, as did Brown (4 of 7 for 28 yards, one touchdown, one interception).

“You can either let it get to you and use that as an excuse for why you’re not playing well,” O’Brien said, “or you can trust the coaching staff that they know what’s they’re doing.”