EAST LANSING, Mich. (AP) -- Curtis Painter threw two touchdown passes and Casey Welch kicked an 18-yard field goal with 4:49 left to lead Purdue to a 17-15 victory over Michigan State on Saturday.
Painter was 21-of-30 for 286 yards and connected for two TD passes to Dorien Bryant, who had seven receptions for 96 yards for Purdue (6-4, 3-3 Big Ten).
Drew Stanton was 16-of-29 for 161 yards, including a 21-yard TD pass to T.J. Williams with just over 14 minutes left to give the Spartans their first lead, 15-14. But Stanton was intercepted by Justin Scott with 6:29. The Boilermakers capped a five-play, 36-yard drive with Welch's field goal.
The loss was another blow to struggling Michigan State (4-6, 1-5), which announced Wednesday that head coach John L. Smith will not return next season.
Purdue scored on the first series of the game, a five-play, 72-yard drive that ended with a 25-yard touchdown pass from Painter to Bryant.
They connected again for an apparent 3-yard scoring pass with around 9 minutes left in the second quarter and Purdue leading 7-3. The play was called back, however, because of an offensive pass interference penalty that left Purdue facing a third-and-17 from the Michigan State 18.
On the next play, Clifton Ryan sacked Painter for a 15-yard loss. Chris Summers attempted a 50-yard field goal, but was wide left.
Painter's 7-yard TD pass to Bryant with 40 seconds remaining in the first half gave the Boilermakers a 14-6 halftime lead.
Brett Swenson kicked field goals of 22 and 46 yards to account for the Spartans' first-half scoring.
Swenson's 40-yard field goal with just over 11 minutes left in the third quarter pulled Michigan State to within 14-9. But the Spartans failed to capitalize after Ryan Allison recovered Brandon Fields' ensuing onside kick at the Purdue 48.
Miami has lost running back Gus Edwards for the entire season because of a left foot injury.
Virginia Tech will wear a decal on its helmets against No. 1 Ohio State on Monday night to honor slain Roanoke television journalists Alison Parker and Adam Ward.
South Carolina football players will wear stickers on their helmets this season to honor the nine people who died in a shooting at Emanuel AME Church in Charleston this past June.
Washington has found its starting quarterback, but coach Chris Petersen said the Huskies will keep that information under wraps until Friday's season opener at No. 23 Boise State.
Joey Counts scored on a 1-yard run on fourth-and-goal with 2 seconds left to give Montana a 38-35 victory over four-time defending FCS champion North Dakota State on Saturday.
Transfer Vernon Adams will be the starting quarterback when Oregon begins its season against Eastern Washington on Sept. 5.