Maryland freshman Ty Johnson takes off for one of his two touchdown runs — his only carries of the game. (Alex Goodlett/Getty Images)

Every member of the Maryland football team gathered for one final picture together after Saturday’s season-ending, 46-41 win over Rutgers. The players climbed on top of each other in uncontrollable joy, flexed their muscles in the rain and, for the first time in 71 days, felt the joy of victory.

Interim coach Mike Locksley stood in the back and grinned wildly as he held his fist in the air, his clothing doused in green sports drink that had been dumped on his head in celebration. Forget that the win came against Rutgers, the Big Ten East’s other bottom-feeder. After a midseason coaching change, an eight-game losing streak and a barrage of injuries, Maryland just wanted a moment to savor.

That moment arrived with just more than one minute remaining, when Maryland’s defense came up with a stop on fourth and one at its own 38-yard line to preserve the win. After a season defined by not being able to finish in the clutch, the Terrapins did just that after rallying from an 18-point halftime deficit.

“What I’m going to remember the most is a bunch of guys that grew together from adversity,” Locksley said.

After slogging through offensive dysfunction all season, Maryland amassed 656 total yards, its most since 2004. A year after blowing an 18-point lead in a loss to Rutgers in last year’s regular season finale, Maryland turned the tables and rallied from a 31-13 halftime deficit, taking the lead for good on an 80-yard Brandon Ross touchdown run late in the fourth quarter.

Ross finished with 173 yards and three touchdowns in his final college game, while Maryland quarterback Caleb Rowe threw for 239 yards in his best performance of the season. He was aided considerably by the Terrapins’ running game, which rolled up 401 yards and six touchdowns.

Maryland (3-9, 1-7 Big Ten) had not won in 10 weeks, and there was little to suggest that Saturday would be any different. Rowe, who suffered a concussion last week, and fellow quarterback Perry Hills (mononucleosis) were available to play, but the Terrapins were missing a string of other important players, including do-it-all junior Will Likely (ankle), wide receiver Levern Jacobs (knee) and place kicker Brad Craddock (wrist).

Hills earned the start but was pulled in favor of Rowe after three drives in which Maryland gained just 19 total yards. Rutgers (4-8, 1-7), which entered the day needing a win to keep its slim bowl chances alive, built leads of 24-3 and 31-10 largely because of the play of quarterback Chris Laviano and senior wide receiver Leonte Carroo, who caught five passes for 132 yards and a touchdown in the first half. (He was held to two catches for 51 yards after halftime.)

“I didn’t have to change it. Those guys led themselves,” Locksley said of the second half. “There wasn’t a lot that needed to be changed.”

But the adjustments were apparent quickly: Cornerback Sean Davis picked off Laviano on the first play of the second half. That set up a 16-yard touchdown run by Ross to make it 31-20. As Rutgers’s defense showed respect to Rowe’s arm strength, Maryland’s offensive line continued to open running lanes.

And Rowe was at his best, finally balancing his gunslinger mentality with the proper reads. He entered Saturday’s game with six touchdown passes against 15 interceptions and later called this past year one of the most difficult of his life. He let go Saturday, passing for 239 yards and rushing for another 98. He did not account for a touchdown, but more important, he did not commit a turnover.

“I was just trying to make plays for my team, have fun,” Rowe said. “That’s what I was able to do.”

Rowe could be himself because of Maryland’s success on the ground, which led to a string of home run plays in the second half. Maryland whittled the lead to 31-27 after a 44-yard touchdown run from true freshman Ty Johnson, who also scored Maryland’s lone touchdown of the first half on a 43-yard run — his only other carry of the game.

A 42-yard run with 9 minutes 43 seconds left by fullback Kenneth Goins Jr. gave Maryland its first lead, 39-38, with just less than 10 minutes remaining.

After Rutgers took a 41-39 lead with 4:57 remaining on a 30-yard Kyle Federico field goal, Ross answered on the next play from scrimmage with the 80-yard touchdown run for the final margin.

“I had a strange feeling before the play that it was going to be open,” Ross said. “The line did a great job as always, and I just saw the opening and creased it.”

The final opportunity for a win came down to the fourth-and-one play after Laviano had led Rutgers to the Maryland 38. The Terrapins were ready for it. All week, players were told by the staff that on third and one or fourth and one, Rutgers preferred to call a quarterback sneak or power run up the middle. Running back Robert Martin veered to the right, only to meet linebacker Jermaine Carter Jr. and a host of Terrapins.

The officials determined that the ball fell short of a first down by one chain link. Maryland’s sideline erupted into celebration.

Locksley later said that he’s unsure of his future with the school as it continues its coaching search, and some players might not be back under the new regime. So a few minutes after the fourth-down stop, they all stayed at that end of the field to pose for one last photo.