“All the credit goes to the players for getting it fixed,” Randy Edsall said after Maryland’s overtime stunner in Blacksburg. (Matt Gentry/AP)

The line of welcoming hugs snaked far into the tunnel, and to C.J. Brown each one felt better than the last. Maryland’s athletic administrators whispered congratulations into his ears. Teammates rubbed their quarterback’s head, sweaty and steaming from the victory he helped conjure for the Terrapins football team.

“It was never-ending,” Brown said. “But I couldn’t get enough.”

The last man to embrace him stood in the end zone, on the opposite side of Lane Stadium from where Brown’s overtime touchdown dive Saturday gave the Terrapins a 27-24 win over Virginia Tech. Coach Randy Edsall hadn’t stopped smiling since the officials confirmed the game-winning three-yard run via video replay. It was an exceedingly rare moment of bliss for Edsall, but after securing bowl eligibility for the first time in his Maryland tenure, who could blame him?

Since Edsall arrived in College Park three years ago, the Terps had not experienced jubilation like this. Battered by injury and showered with criticism during a three-game losing streak, Maryland limped into Saturday afternoon’s contest following a week of introspection, when the team’s leaders gathered everyone together and demanded change.

“All the credit goes to the players for getting it fixed,” said Edsall, who won a game after Oct. 13 for the first time as Maryland’s coach and became the first Terrapins coach to win in Blacksburg since 1949. “We had a determination. We had a passion. We had a resolve that nothing was going to stop us.”

Since suffering a concussion after at Florida State on Oct. 5, Brown had become a less-mobile shadow of his former self. After carving up Maryland’s nonconference opponents with both his legs and his arm, Brown came to Blacksburg with minus-28 rushing yards during ACC games.

But the Terps (6-4, 2-4 ACC) studied Virginia Tech’s man-to-man coverage on film and knew the Hokies (7-4, 4-3) emptied the second level to either blitz or drop back. During the game, Edsall pulled Brown aside and told him, “Don’t be afraid to run.” The result? Two rushing touchdowns, including one just before halftime that gave the Terps their first intermission lead since September, and 257 of the team’s 319 total yards.

“We were at a tipping point in the season,” Brown said. “We could either shut it all down like we have in the past and go 0-fer towards the end of the season, or we can step up, come down here and make a statement.”

Brown’s career day against the ACC’s best defense, which also included a perfect 16-yard fade route to Nigel King that put the Terps up 21-7 just after halftime, was bookended by seven sacks of Hokies quarterback Logan Thomas, 11 tackles for a loss and a 63-yard punt return from touchdown from freshman Will Likely.

Maryland’s defense and special teams seemed gassed in the second half, allowing an 88-yard kickoff return by wide receiver Demitri Knowles and Thomas’s five-yard touchdown pass to Willie Byrn that tied the score at 21 in the fourth quarter. But once overtime dawned, the defense again took the lead. A questionable pass interference call on Alvin Hill had Edsall steaming and gave Virginia Tech first and goal from the 9-yard line. After two short rushes, Thomas dropped back to pass on third down, but Andre Monroe burst through the middle and recorded an eight-yard sack, his third of the game. The Hokies settled for a 31-yard field goal.

“They were pretty right on everything we were about to do,” said Thomas, who had two touchdown passes but lost for the first time in 16 career games when he didn’t throw an interception.

The Terps took over, and three straight carries from running back Brandon Ross brought them within three yards of victory, so Edsall called a tight end pass to win it. When Virginia Tech’s defense blanketed Dave Stinebaugh, Brown bolted around the left edge.

Linebacker Tariq Edwards met Brown near the goal line, so the quarterback yanked himself sideways and cradled the ball in his right hand. As he clipped the pylon and tipped it over, Maryland’s players started rushing the field. Even as an official interrupted the madness to order a video review, the celebration continued. Edsall pumped his fist when the video board showed the replay. Behind him, the Terps began jumping on Brown’s back and slapping his helmet.

“I was worried about getting a concussion,” he joked later, when the hugs were done and all that remained was bliss.