CHAMPAIGN, Ill. (AP) -- Quarterback Curtis Painter ran for two touchdowns and threw for another as Purdue rallied for a 42-31 victory over mistake-prone Illinois on Saturday.
The Boilermakers (7-4, 6-3 Big Ten) trailed by nine points in the third quarter before defensive end Alex Magee led a defensive charge that turned around the game.
Magee, who recovered a fumble by Juice Williams in the end zone for a second-quarter TD, intercepted a pass in the third quarter and forced a fumble in the fourth quarter to set up touchdowns.
Illinois (2-9, 1-6), who gave No. 1 Ohio State a scare in a seven-point loss a week ago, lost its sixth straight game.
The Illini turned the ball over four times in five plays during their second-half collapse, and Purdue scored touchdowns off three of the miscues after trailing 23-14.
Painter ran 42 and 18 yards for TDs in the second half and wide receiver Dorien Bryant caught a 20-yard touchdown pass to give Purdue a 28-23 lead with 2:02 left in the third quarter. Bryant also scored on a 6-yard run early in the fourth quarter.
Painter was 20-for-49 for 229 yards with a touchdown and interception, and ran for 54 yards. Bryant caught nine passes for 120 yards and a touchdown. Purdue had 431 yards of total offense.
The Boilermakers forced a season-high five turnovers. Defensive end Cliff Avril tipped a pass and recovered a fumble in the second half.
Williams, Illinois' freshman quarterback, rushed for a career-high 145 yards on 22 carries and scored his first touchdown on a 20-yard run to cap a 12-play, 80-yard drive on the first series of the game.
Illinois running back Pierre Thomas rushed for 105 yards on 10 carries and a touchdown as the Illini finished with 316 yards rushing.
Illinois Jason Reda made field goals of 38, 29 and 30 yards. Illinois led 16-14 at half.
Kory Sheets' 3-yard touchdown run in the first quarter capped an 11-play, 73-yard drive for Purdue's first score.
Williams fumbled in the end zone after being sacked by Purdue's Anthony Spencer early in the second quarter. Magee fell on the ball for the score to give Purdue a 14-10 lead.
Cary Chow and Adam Rittenberg discuss four marquee games on a weekend ripe with College Football Playoff implications.
No. 2 Alabama is a decided favorite at Auburn. Adam Rittenberg previews the Iron Bowl.
No. 3 Oklahoma travels to No. 11 Oklahoma State in a game which could end the Big 12 title race. Adam Rittenberg previews one of the biggest Bedlam games ever.
The Game features a pair of top-10 teams for the first time since 2006. Adam Rittenberg discusses the keys for each of No. 8 Ohio State and No. 10 Michigan to come away victorious.
The winner of No. 6 Notre Dame at No. 9 Stanford needs one of several things to go its way to reach to College Football Playoff. Adam Rittenberg breaks down Saturday's showdown in Palo Alto.
On Nov. 27, 2010, Oklahoma State's Brodrick Brown gave new meaning to the tip drill when he leaped out of bounds to deflect the ball back into play, where LB Shaun Lewis completed the improbable interception.