CHAMPAIGN, Ill. -- Purdue gashed Illinois for 349 yards rushing and first-time starting quarterback Austin Appleby threw for a touchdown and ran for two more to lead Purdue to a 38-27 upset on Saturday at Illinois.

Appleby was 15 of 20 for 202 yards. He ran for another 76 yards on seven carries.

Akeem Hunt carried the ball 30 times for 177 yards and a touchdown.

The Boilermakers (3-3, 1-1 Big Ten) took a 24-14 lead on an 80-yard touchdown pass from Appleby to Danny Anthrop in the third quarter.

Big plays sank the Illini (3-3, 0-2). Besides the 80-yard touchdown, Purdue had plays of 62, 54 and 53 yards.

Wes Lunt led Illinois with 332 yards passing and two touchdowns. But he limped off the field with help early in the fourth quarter after a big hit and did not return.

Anthrop's touchdown capped a jarring momentum swing early in the third quarter that turned the game for Purdue.

Trailing 17-14, Illinois moved deep into Boilermakers territory on a flea-flicker from Lunt to Mike Dudek. The freshman receiver wrestled the ball away from two defenders as he came down to set Illinois up at the Purdue 12.

Dudek finished with eight catches for 200 yards.

But on the next play Lunt threw the ball to Josh Ferguson in the left flat and the back dropped the ball. The play was initially ruled an incomplete pass but the Boilermakers fell on the ball. Replays showed Ferguson was 2 yards behind Lunt when he dropped the ball and after a review the play was called a fumble.

On the next play, Appleby found Anthrop. Illini safety Zane Petty lunged for the ball, missed and fell as Anthrop glided up the right sideline for a touchdown.

Facing the prospect of trailing again, the Boilermakers instead found themselves leading 24-14 with 9:59 left in the third quarter.

And Illinois, down by two scores, was playing catch-up.

All three Illini wins this season have required second-half comebacks, but on Saturday the Illinois defense couldn't get the stop it needed against a Boilermakers offense that came in struggling.

Purdue entered the game with one of the Big Ten's least-effective offenses. The Boilermakers were averaging 23.8 points and a conference-worst 312 yards a game. They were 13 yards short of topping that yardage mark by halftime.

For most of the fourth quarter, the Illini also were without the player who engineered those comebacks.

Lunt went down hard on a sack by Ryan Watson that forced him out of the game.

He missed last week's Nebraska game with a right-knee injury but details about the injury against Purdue weren't immediately available.

His backup, Reilly O'Toole, was 9 of 14 for 118 yards and an interception.

Hunt found big holes in Illinois' defense and made the most of them. But Appleby did too.

The quarterback's biggest carry didn't find the end zone but it set up one of his touchdowns.

With just over 4 minutes left in the third quarter, the 6-foot-5 quarterback dropped back but saw daylight through the middle of the Illinois defense and ran into it. Leaving an Illinois defender on the ground beneath him just past the line of scrimmage, Appleby sprinted 62 yards to the 1.

He punched the ball into the end zone on the next play. With a 31-21 lead, Purdue wouldn't need anything else.

Early on it looked like Illinois might run away from the Boilermakers.

The Illini led 14-7 on a 13-yard Lunt touchdown to Tyler White and a 2-yard run by Josh Ferguson and midway through the second quarter were driving again. But on a fourth-and-2 play at the Purdue 23 Lunt missed Martize Barr in the end zone.