WEST LAFAYETTE, Ind. (AP) With Nebraska's season in flux, Tanner Lee had some Saturday night fun.

The reads slowed down. The receivers came up big. He made sure the sideline and first down markers were a factor on almost each of those last seven plays. And when that final drive ended, the Cornhuskers two-game losing streak was history.

Lee's second touchdown pass of the night, a 13-yarder to Stanley Morgan Jr. with 14 seconds left, gave Nebraska a season-saving 25-24 victory at Purdue.

''That was a lot of fun,'' Lee said after rallying the Cornhuskers from a 12-point deficit in the final 11 1/2 minutes. ''You don't want to win that way, but we practice every day. It felt good to put it in action and be able to execute.''

Nebraska (4-4, 3-2 Big Ten) took a big step forward by avoiding its first three-game skid since 2008.

So did Lee.

The junior, a transfer from Tulane, started the season with nine interceptions in his first 135 passes. Since then, he's been picked off once in 155 throws.

And he was at his best against the Boilermakers (3-5, 1-4). Lee finished 32 of 50 for 431 yards - all career bests. He also threw two TD passes, the first a 27-yarder to Tyler Hoppes to cut a 24-12 deficit to 24-19, before masterfully driving the Cornhuskers 70 yards in 68 seconds with no timeouts.

The last throw was a perfect third-down strike to the well-covered Morgan at the goal line.

''Tanner was outstanding,'' coach Mike Riley said. ''It was just a quick post to Stanley Morgan off of a tight split. Stan had been running a lot of corners, a lot of out-breakers throughout the game. It was a nice call, change-up, curveball call that got in there for a nice touchdown.''

For the Boilermakers, it hurt.

They outrushed Nebraska, 199 yards to 40. They led 24-12 just 37 seconds into the fourth quarter after David Blough connected with Jackson Anthrop on a 13-yard TD pass. They held the Cornhuskers to field goals on their first four trips into the red zone and even came up with a stop on fourth-and-6 with 3:44 to play.

But after getting the ball back, they couldn't get the last first down to seal it - and the weary defense couldn't come up with one last stop to prevent a third consecutive loss.

''They were able to get it out of bounds too many times,'' coach Jeff Brohm said. ''But we should have found a way to get a first down and that wouldn't have happened.''

THE TAKEAWAY

Nebraska: It wasn't easy and sure didn't go according to plan. But Nebraska survived - and that's all that really matters. The Cornhuskers need two wins to become bowl eligible.

Purdue: After an impressive start, the Boilermakers' bowl hopes have taken a major hit. They need to win three of the last four, and while remaining schedule is manageable (home against Illinois, at Northwestern, at Iowa and home against Indiana), there's no margin for error.

KEY NUMBERS

Nebraska: Morgan caught six passes for 112 yards and Hoppes had five catches for 105 yards. Jaylen Bradley had seven carries for a team-high 42 yards. Drew Brown made four field goals to tie Kris Brown for second in school history (57).

Purdue: Blough was 16 of 28 for 164 yards and one TD while running for another score. Richie Worship had 18 carries for 89 yards, both career bests, and scored on a 4-yard run. D.J. Knox carried nine times for 66 yards. Anthrop led the receivers with six catches for 55 yards. Gelen Robinson had nine tackles, two sacks and 5 1/2 tackles for loss.

THEY SAID IT

Nebraska: ''I think everyone wanted to get it done. I think everyone knew we could,'' Lee said.

Purdue: ''We were saying constantly that we didn't want to be too soft,'' Brohm said, referring to Nebraska's final drive. ''We had some guys in there who and a chance to tackle them, and we let them get out of bounds.''

UP NEXT

Nebraska: Hosts Northwestern on Nov. 4, a team it has beaten five times in the last six games.

Purdue: Will try to snap its losing streak when Illinois visits Ross-Ade Stadium on Nov. 4.

---

More college football coverage: http://collegefootball.ap.org and www.Twitter.com/AP-Top25 .

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.