Aidan O’Connell threw for a career-best 536 yards, matched his career-high with three touchdown passes, and led Purdue past No. 5 Michigan State 40-29 on Saturday, leaving the Big Ten without any unbeaten teams.

Purdue’s second major upset in four weeks could keep the conference out of the College Football Playoff for the third time in five years. The Boilermakers (6-3, 4-2), who won at then-No. 2 Iowa last month, are bowl-eligible for the first time in three years. They tied for the West Division lead and extended their FBS record for wins over top-five teams when unranked to 17.

“We’ve got a group of guys that are really hungry. We’ve had some adversity along the way, but that’s football and that’s what trains you to be great,” coach Jeff Brohm said. “It’s just a truly a great win for our program.”

The Spartans (8-1, 5-1) lost to Purdue for the first time since 2006 and trail Ohio State in the East by one game.

Also read: NCAA: Ohio State Buckeyes win a nervous battle against Nebraska Cornhuskers

O’Connell went 40 of 54, including a 39-yard TD to Jackson Anthrop on a beautifully executed trick play that put Purdue ahead 21-7 in the second quarter. Anthrop began the play in motion, took a handoff, and gave the ball to a wide receiver on a reverse who then pitched the ball back to O’Connell. The QB tossed an easy screen pass back to Anthrop, who followed a convoy of blockers into the end zone.

David Bell hauled in 11 passes for 217 yards and a touchdown. He posted his 15th career 100-yard receiving game, breaking John Standeford’s Purdue record.

Even another strong showing by Kenneth Walker III — 23 carries for 146 yards and a score — couldn’t keep the Spartans on track. Michigan State (8-1, 5-1, No. 3 CFP) spent most of the day playing catch-up.

“We weren’t able to move the chains and convert when we needed to,” Spartans coach Mel Tucker said.

The Spartans got within 21-14 at halftime and tied the score on their third play of the second half when quarterback Payton Thorne ran 39 yards for a touchdown.

King Doerue broke the tie with a 1-yard TD run on the ensuing series and the Boilermakers extended the margin to 37-21 with three field goals. The Spartans closed to 37-29 on Thorne’s second TD pass to Tre Mosley and a 2-point conversion pass from Thorne to Maliq Carr.

Purdue sealed it with a 22-yard field goal with 41 seconds left.

THE TAKEAWAY

Michigan State: The Spartans haven’t been 9-0 since 1966 and again failed to follow up a big, emotional victory — last week over Michigan — with another win. Michigan State must win out to have a chance to play for its first Big Ten crown since 2015.

Purdue: Coach Jeff Brohm pulled off a rare feat — beating two top-five teams in the same season for the first time since 1960. The fans, fittingly, rushed the field to celebrate.

POLL IMPLICATIONS

Michigan State: The Spartans will slide behind Ohio State in the AP Top 25. How far they fall in the CFP standings will indicate whether Michigan State still has a chance to make the four-team playoff.

Purdue: Expect the Boilermakers to return to the Top 25 for the second time this season.

UP NEXT

Michigan State: Hosts Maryland next Saturday.

Purdue: Faces its second straight top-10 foe when it visits No. 6 Ohio State next Saturday.