IOWA CITY, Iowa (AP) -- Paul Griggs drilled a 46-yard field goal as time expired and Purdue stunned Iowa 27-24 Saturday, snapping a five-game losing streak.
Robert Marve threw for 266 yards and two touchdowns for the Boilermakers (4-6, 1-5 Big Ten), who won for the first time in Iowa City in 20 years.
Purdue led 24-14 before Iowa (4-6, 2-4) rallied to tie the game with 3:32 left. But the Boilermakers stuffed the Hawkeyes on fourth down with 16 seconds left, and then drove 37 yards to set up the game-winning kick by Griggs.
James Vandenberg had 190 yards passing and a TD for Iowa, which has lost four straight for the first time since 2007.
Iowa got the ball back with 1:08 left in a tie game and moved 52 yards in 52 seconds. But a risky try on fourth down - with a strong headwind leaving a field goal as a long shot - gave Purdue just enough time to pull off a stunner.
Vandenberg's 1-yard completion to Zach Derby on fourth-down-and-3 gave Purdue just 16 seconds to get in field goal range. Marve ran for 17 yards and found Antavian Edison for 20 more, setting up Griggs to drill the longest field goal of the season by Purdue.
Iowa has now played in six games decided by three points or less and has lost four of them.
The Hawkeyes were outgained 490 yards to 264, but three Purdue fumbles kept them in the game until the end.
Iowa pulled within 17-14 on Vandenberg's 5-yard pass to C.J. Fiedorowicz late in the third quarter. It was just Vandenberg's fifth TD toss of the season, and it helped brighten the mood of a frustrated home crowd.
The good cheer was short-lived.
Purdue's Ralph Bolden somehow stayed in bounds with nearly the entire Iowa defense flushing him to the sideline, tip-toeing 56 yards to set up Marve's 10-yard touchdown pass to Gary Bush to put the Boilermakers ahead 24-14.
But Iowa caught a huge break when Marve's fumble bounced into the arms of cornerback Micah Hyde, who returned it 9 yards to make it 24-21 Purdue heading into the fourth quarter.
The Hawkeyes tied it up at 24-all on a 24-yard field goal by Mike Meyer with 3:32 left.
Purdue opened the scoring with a 3-yard TD run by Akeem Shavers. The Boilermakers then fumbled the ball to Iowa on back-to-back plays - a no-no against an opponent that has struggled to score all season.
Marve threw a lateral that was ruled a fumble after a booth review early in the second quarter, but Iowa had to punt it right back. Shavers' fumble on Purdue's 22 gave the punchless Hawkeyes another easy shot at the end zone, and Bullock's 1-yard touchdown run made it 7-7.
The Boilermakers quickly answered those mistakes with an 11-play scoring drive facilitated in part by terrible tackling on the part of the Hawkeyes - something they fought through all afternoon.
It took five minutes and ended with a 9-yard touchdown grab by Gabe Holmes that put Purdue ahead 14-7 with 4:43 left before halftime.
The Boilermakers had a halftime lead for the first time since eventually losing to Ohio State in overtime on Oct. 20. They did about all they could to give it back, but Marve and Griggs were clutch in the final 16 seconds.
Purdue can now become bowl eligible with wins over Illinois and Indiana. Iowa must beat Michigan and Nebraska to do the same.