MADISON, Wis. -- Penn State had been terrible on the road this season. Wisconsin had been perfect at home.
Both trends changed drastically Saturday in Camp Randall Stadium.
Behind a sensational four-touchdown performance from freshman quarterback Christian Hackenberg, the Nittany Lions stunned the No. 15 Badgers 31-24.
Penn State (7-5, 4-4 Big Ten) had lost each of its previous three Big Ten road games, by the combined score of 131-48. Wisconsin (9-3, 6-2) had allowed just one of its six visiting opponents to get within 28 points. But the usually stingy Badgers' defense had few answers for Hackenberg, who completed 21 of 30 passes for 339 yards, four touchdowns and no interceptions.
Wisconsin quarterback Joel Stave threw a 5-yard touchdown pass to tight end Brian Wozniak to make the score 31-21 with 5:38 to play, and Jack Russell's 48-yard field goal made it 31-24 with 4:13 to play.
But Penn State running back Zach Zwinak, who had been bottled up by the Badgers all night, broke off a 61-yard run on third-and-10, and Wisconsin, out of timeouts, could not stop the clock. Safety Ryan Keiser intercepted Stave's desperation heave in the end zone with one second left.
Hackenberg, who was 21-of-30 passing for 339 yards, gave Penn State a 21-14 lead midway through the third quarter with a 7-yard touchdown pass to tightly covered tight end Jesse James. The Nittany Lions added three more points on Sam Ficken's 28-yard field goal after linebacker Brandon Bell knocked the ball out of Stave's hands into the arms of defensive end C.J. Olaniyan, who returned it deep into Badgers territory.
Hackenberg tossed his fourth touchdown pass of the day and 20th of the season early in the fourth quarter, when wide receiver Eugene Lewis got behind two defenders for a 59-yard score.
Penn State wasted little time getting on the scoreboard. Hackenberg rolled to his right on the game's opening drive and found tight end Adam Breneman, who broke a tackle on his way to a 68-yard touchdown reception.
Wisconsin answered with two 11-play scoring drives, of 71 and 77 yards, capped by touchdown passes by Stave of 4 yards to Wozniak and 20 yards to wide receiver Jeff Duckworth. The second gave the Badgers a 14-7 lead with 5:05 left in the second quarter.
But Penn State caught a break when no one covered Lewis in the left flat and Wisconsin coach Gary Andersen couldn't get a timeout called before Hackenberg snapped the ball and threw a 3-yard touchdown pass with 1:16 to play in the half.
NOTES: Wisconsin lost at home for just the third time in the last four seasons. The Badgers had won 25 of their previous 27 home games prior to Saturday. ... Penn State has not lost consecutive games under Bill O'Brien since dropping the first two games of the 2012 season. ... Wisconsin had held its three previous Big Ten opponents without a touchdown, but Penn State scored four, including one on its opening drive.