COLLEGE PARK, Md. (AP) — After losing his job to a freshman, Peyton Ramsey never abandoned the work ethic that enabled him to start 12 games at quarterback for Indiana last year.
Ramsey's willingness to be ready at a moment's notice paid off handsomely Saturday for the gritty junior, who threw for 193 yards and a touchdown in a relief role to help the Hoosiers beat Maryland 34-28.
Ramsey took over for injured Michael Penix Jr. with 12 minutes left in the second quarter and Indiana ahead 14-7. Showing no small measure of poise, Ramsey exuded calm in the huddle and finesse while running the offense.
"I'm just so proud of Patrick Ramsey," coach Tom Allen said. "What an absolutely awesome young man. He was ready to play when called upon. It's been tough on him, but he's the ultimate team player. He proved his value to his teammates today."
Coming off a season in which he threw for 2,875 yards and 19 touchdowns, Ramsey was displaced as the starter by Penix, a redshirt freshman with a dynamic left arm. Instead of moping or seeking a transfer, Ramsey stayed on as a backup and made the best of the situation.
"You take a lot of pride in being the guy, so be able to accept that, a lot of guys can't," Allen said. "He chose to stay for this football team. Not just stay, but be prepared every week."
Ramsey may not be done as a starter. Allen would not describe any aspect of the injury to Penix except to say, "I'm not sure what next week holds, but I don't think it's a long term thing."
It may not matter, because Ramsey looked good behind center after a short period of adjustment. He got a field goal out of his first drive and threw a 26-yard touchdown pass to Nick Westbrook before halftime for a 24-21 lead.
"I started off a little shakier than I would have liked to, but I knew the game plan, knew where the ball was supposed to go," Ramsey said. "It was just getting that first drive out of my system, and then I felt good after that."
With Ramsey leading the way, the Hoosiers (5-2, 2-2 Big Ten) amassed 520 yards, including 334 through the air against the worst pass defense in the conference. Ramsey went 20 for 27 and ran for 46 yards.
Penix was 9 for 14 for 141 yards with a touchdown and an interception.
Stevie Scott took care of the ground game, grinding out 108 yards and two touchdowns.
Javon Leake ran for a career-high 158 yards and two scores for Maryland (3-4, 1-3), which has lost four of five under first-year coach Michael Locksley.
The Terrapins had a shot at the end, but their final two possessions ended in turnovers.
"We didn't make plays when we had opportunities to," Locksley lamented. "We had two drives at the end there to win the ballgame and we didn't get it done. Ended those two drives with turnovers. Good teams don't beat themselves, and we continue to do it. I have to get us fixed."
A 9-yard touchdown run by Scott put Indiana ahead 31-21 in the third quarter, but Maryland answered with a 1-yard TD run by Leake following a 52-yard completion from Tyrrell Pigrome to Tyler Mabry.
It was still 31-28 with 3:42 remaining when Indiana's Juwan Burgess stripped the ball from Leake and pounced on the loose ball at the Maryland 15. That set up a field goal, and the Terrapins got to the Indiana 42 before an interception ended their final threat.
"We played our heart out. I know that for a fact," Leake said. "We just made some bad turnovers at the end."
Starting a second straight game for injured starter Josh Jackson, Pigrome completed 17 of 27 passes for 210 yards. His last pass, picked off by Reese Taylor, was one he would like back.
"I thought the line protected well on that play," Pigrome said. "It was me. I just overthrew the ball a little bit."
Penix and Ramsey combined for 280 yards passing in the first half, and each threw a touchdown.
The Hoosiers got their first score on a 28-yard pass from Penix to Donavan Hale and went up 14-7 when Scott ran in from the 3.
Indiana was poised to add to the advantage when Antoine Brooks Jr. picked off a deflected pass in the end zone. Leake then peeled off a 60-yard touchdown run.
The Terrapins were without running back Anthony McFarland Jr., who has been nursing a high ankle sprain for several weeks. McFarland has scored seven touchdowns, but last week against Purdue was limited to four yards on four carries. The sophomore ranks second on the team with 340 yards rushing.
Brooks' interception extended to 19 the number of successive games in which Maryland has forced a turnover. The streak started in the 2018 opener.
Indiana: Winning on the road isn't easy in the Big Ten, so the Hoosiers won't apologize for an uneven performance that provided the desired result. Style points do not apply when adding up the number of wins to become bowl eligible.
Maryland: Locksley takes pride in the play of his offense, which has been adequate. But his defense is atrocious, and that is why the Terrapins appear destined to stagger down the stretch in a season that started with blowout wins over Howard and Syracuse.
Indiana: At Nebraska next Saturday. The Hoosiers are 0-5 against the Cornhuskers since a 23-7 victory in 1959.
Maryland: At Minnesota next Saturday. The Golden Gophers are the surprise of the Big Ten, unbeaten after seven games.
More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP_Top25