WEST LAFAYETTE — Aidan O’Connell was the next man up.

He delivered a performance that won’t be forgotten anytime soon, rallying Purdue to a 31-27 win over Nebraska in front of 50,606 fans at Ross-Ade Stadium on Saturday.

The Boilermakers (3-6 overall, 2-4 Big Ten) have battled through myriad injuries this season and added one more against Nebraska, at possibly the most inopportune time.

Purdue quarterback Jack Plummer left the game with just more than eight minutes remaining, suffering an apparent lower leg injury on a 14-yard scramble to the Cornhuskers’ 11-yard line.

Nebraska (4-5, 2-4) was leading 20-17 at the moment of Plummer’s injury. Enter, O’Connell, a sophomore who had played in two previous games and thrown just 15 passes.

O’Connell finished off the drive Plummer started, which resulted in King Doerue’s 7-yard touchdown run, before later leading a game-winning scoring drive to take the lead in the final minute of the game.

“I’m very proud of Aidan because he’s come in here and worked his tail off to get ready to play,” Purdue head coach Jeff Brohm said. “I think playing last week helped him get a little rust off and some nerves out of him. I think he was relaxed when he came in. He made some big plays and big throws. And he executed the offense.

“That’s a tremendous job by him. When you take a chance to come here to walk on and try to play, instead of going somewhere else and playing faster, and then you help us beat Nebraska — I think that’s a great moment for him.”

Doerue’s 7-yard touchdown run put the Boilermakers ahead 24-20 with 6:50 remaining. Nebraska answered with a 9-play, 71-yard scoring drive that was capped by quarterback Adrian Martinez’s 4-yard touchdown run that put the Cornhuskers ahead 27-24 with 4:21 remaining.

That set up O’Connell to lead Purdue’s game-winning drive. O’Connell calmly led Purdue’s offense down the field. There wasn’t anything flashy, just taking what Nebraska’s defense was allowing — a lot of open tight ends down field.

Purdue began its game-winning drive at its own 18-yard line. O’Connell was 6-for-6 passing on the final drive, finding tight ends on four of those completions.

Brycen Hopkins had three of those catches on the drive, including a nice 26-yard catch down to Nebraska’s 27-yard line with just less than two minutes remaining. He had a 10-yard reception two plays later that put Purdue in the red zone.

Doerue rushed for five yards on the next two plays, leading up to the game-winning touchdown. On a third-and-5 play from the Cornhuskers’ 9-yard line, Purdue faked a power run up the middle and O’Connell tossed to David Bell on an end-around and the freshman wide receiver went into the end zone untouched for the game-winning touchdown. J.D. Dellinger’s extra point kick put the Boilermakers ahead 31-27 with 1:08 remaining.

Four plays later O’Connell was back on the field leading Purdue in the victory formation.

Nebraska took over at its own 20-yard line with 61 seconds remaining. Martinez’s first-down pass was incomplete as he was pressured by Purdue freshman defensive lineman George Karlaftis. The next pass was low and incomplete, followed by a 7-yard catch on third down. On fourth down, Purdue lineman Derrick Barnes tipped the pass at the line and it fell incomplete.

Nebraska threatened to take control of the game early. Plummer threw a first-quarter interception on a shovel pass, which Nebraska defensive tackle Darrion Daniels returned to Purdue’s 2-yard line.

But an incomplete pass, a sack by Barnes and a penalty forced Nebraska to settle for a field goal and a 10-0 lead after one quarter. Nebraska had another possession go deep into Purdue territory, but Purdue freshman Corey Trice’s third interception of the season took away that scoring opportunity.

“I think early on, even though they had a couple of big plays, our defense kept us in the ballgame,” Brohm said. “That team has some weapons and they will spread you out, but with that being said I think they played with great effort, played to the end and did some good things.”

Purdue, though, rallied to take a 14-10 lead into halftime.

Doerue rushed for a 3-yard touchdown midway through the second quarter to cut the Cornhuskers lead to a possession at 14-7.

On Purdue’s next possession, Plummer had a key 19-yard run that set up Payne Durham’s 16-yard touchdown catch. On that play, Durham broke a tackle at the 10-yard line and side-stepped, spun away from from another defender at the 6-yard line before getting into the end zone.

The teams exchanged field goals in the third quarter. Nebraska’s Barret Pickering had a 21-yard field goal while Dellinger had a 44-yard field goal with plenty of distance to spare that put the Boilermakers ahead 17-13.

Martinez put Nebraska ahead 20-17 with his 2-yard run with 12:30 remaining in the fourth quarter.

Brohm said Plummer’s injury might be season-ending. Prior to leaving with his injury, Plummer was 25-of-34 passing for 242 yards, two touchdowns and two interceptions.

Doerue rushed 15 times for 71 yards and one touchdown, also catching five passes for 31 yards and a touchdown. He became the first Purdue player since Ralph Bolden in 2009 to have multiple games of at least one receiving touchdown and one rushing touchdown.

Hopkins finished with eight catches for 97 yards and Bell had seven catches for 23 yards, along with his game-winning 9-yard touchdown run.

Ben Holt led Purdue’s defense with 10 tackles, while Jalen Graham had eight tackles and two tackles for a loss. Barnes and Kai Higgins each had two tackles for a loss, while Cam Allen had one tackle for a loss.

Purdue travels to Northwestern for a noon ET kickoff Nov. 9.