STATE COLLEGE, Pa. -- Penn State had the ball at its own 20-yard line with 50 seconds left, down seven points to a Michigan team that had controlled most of the second half. It did not look good for the Nittany Lions.
But Penn State still had one more card to play.
"If we have Allen," defensive end Deion Barnes said, "we have a chance."
Allen Robinson, continuing his superb season, made a tightrope catch near the sideline for a 14-yard gain, then came down with a 37-yard grab two plays later, setting up the tying touchdown in regulation in the Nittany Lions' 43-40, four-overtime victory over Michigan on Saturday in Beaver Stadium.
Penn State covered 80 yards in five plays and 23 seconds against a defense that had held it to 146 yards and six points on six previous second-half possessions.
"That's a situation that we've been in numerous times in practice," said Robinson, who caught five passes for 84 yards. "From the time camp started to now, we probably have run 100 two-minute drills, with 30 seconds remaining, 50 seconds remaining, zero timeouts, one timeout. It's something that we've practiced."
The Nittany Lions and Wolverines went back and forth for four overtimes before Bill Belton's 2-yard touchdown run ended a game that most of the announced 107,884 in attendance had stayed with through some sloppy overtime execution by both teams.
Michigan kicker Brendan Gibbons made two field goals and missed two on the Wolverines' four possessions, and Penn State had one Sam Ficken made field goal, one miss and a lost fumble before Belton's score.
Penn State (4-2 overall, 1-1 Big Ten) won for the second time in overtime under Bill O'Brien and Michigan (5-1, 1-1) lost for the first time this season.
"I thought our guys came back in the second half and played better," Michigan coach Brady Hoke said. "We've got to execute at all positions better. Both teams kept sticking around. It's a tough one every time you go into overtime, but you've got to move forward."
Penn State trailed in the final minute of regulation before quarterback Christian Hackenberg connected with Robinson for a 14-yard gain that was initially ruled out of bounds but then overturned by replay. Hackenberg then found Brandon Felder for 29 yards before hooking up again with Robinson, who came down with a jump ball at the half-yard line. Hackenberg snuck the ball in on the next play to tie the score.
Penn State's defense, which had forced six turnovers in its first five games, came up with three takeaways in the first half alone, and the Nittany Lions capitalized on two of them.
Hackenberg threw a pass off his back foot to the back of the end zone to Felder after a Jordan Lucas interception of a pass by Michigan quarterback Devin Gardner.
Hackenberg also fired a 20-yard touchdown to tight end Jesse James after Penn State defensive end Anthony Zettel had dropped into coverage and intercepted Gardner, who completed only 6 of 12 first-half passes, early in the second quarter.
"You can't say enough about our defense," Penn State coach Bill O'Brien said. "They gave up a couple plays, but overall, they played a whale of a football game. I thought all those guys really contributed to the win."
Both teams struggled to run the ball. Michigan had 54 carries for 149 yards and Penn State had 44 carries for 85 yards.
Michigan, which had not beaten Penn State since 2007, got a score in the opening 10 seconds of the second half when Frank Clark recovered a Zach Zwinak fumble and returned it for a touchdown, starting a 24-3 run for the Wolverines.
Hackenberg completed 22 of 43 passes for 305 yards, three touchdowns and two interceptions. Gardner was 15 of 28 for 240 yards, three touchdowns and two picks.
"It hurts, but I'm so proud of my teammates," Gardner said. "There was a lot of adversity during the game and we fought back, but it wasn't enough."
Felder caught six passes for 97 yards and James had six grabs for 67 yards.
Michigan tight end Devin Funchess had 112 yards and touchdowns of 59 and 37 yards on just four grabs and Jeremy Gallon had seven catches for 95 yards and a score.
NOTES: Michigan OT Taylor Lewan left the game in the second quarter with an unspecified injury and did not return in the second half. ... It was officially the longest game in Penn State history. ... Penn State's victory was its fourth straight over Michigan, which had won each of the previous nine meetings.