WEST LAFAYETTE, Ind. – Michigan State senior kicker Brett Swenson made a compelling case for the Lou Groza award by kicking four field goals, including the game-winner with 1:51 remaining, in Saturday's 40-37 victory over Purdue.

The Spartans (6-5, 4-3 Big Ten) became bowl-eligible for the third straight season for the first time since 1995-97. Michigan State can enhance its postseason stature by beating 19th-ranked Penn State in next Saturday's 3:30 p.m. regular season finale in Spartan Stadium.

The Boilermakers (4-7, 3-4) were eliminated from bowl contention.

See: The Hawley Three For This Purdue Game

Swenson's final effort, a 21-yarder, was set up by an 85-yard kickoff return by Keshawn Martin, who waited for a key block by wideout Blair White.

Swenson also kicked a career-long 52-yard field goal in the third quarter, and then matched it later in the period.

Michigan State pulled out the victory even though the defense gave up a season-worst 524 yards of total offense by the Boilermakers.

The Spartans' bowl hopes were flagging after they fell behind 34-23 on a 1-yard touchdown plunge by Purdue running back Ralph Bolden with 11:52 remaining in the fourth quarter.

However, on MSU's ensuing possession, quarterback Kirk Cousins arched a perfect, career-long, 73-yard touchdown pass to wideout B.J. Cunningham to keep the Spartans in the game.

See: Purdue's Joey Elliott Named Big Ten Offensive Player of the Week

And when defensive back Jeremy Ware blocked a 50-yard field-goal attempt by Boilermakers' kicker Carson Wiggs and Chris L. Rucker recovered at the Purdue 46-yard line, the Spartans were poised to regain the lead.

On first down, Martin took the handoff on a reverse and ran 45 yards to the Boilermakers 9.

After a running play and an incomplete pass failed to move the ball forward, Cousins White on a crossing pattern to the middle of the field for a touchdown for a 37-34 lead with 6:59 left.

Wiggs, however, tied the score with a 49-yard field goal, but Swenson countered with the game-winner.

The Spartans trailed 20-17 at halftime.

Swenson's game-opening kickoff resulted in a touchback for Purdue, one of the quickest scores in school history gave MSU a 7-0 lead just seven seconds into the first quarter.

See: Purdue Beats Michigan in Ann Arbor For First Time Since 1966

On first down, Boilermaker quarterback Joey Elliott faked a pass to his left before turning to his right to hand the ball off to Bolden. However, the ball ended up on the ground and Rucker scooped up the fumble and returned it 11 yards for a touchdown.

It was MSU's first fumble return for a score since Travis Key at Purdue in 2007.

The Boilermakers were unfazed, however, and tied the score with their next possession on a 26-yard pass from Elliott to wideout Keith Smith, who slipped the attempted tackle of safety Kendell Davis-Clark on his way to the end zone.

The Spartans offense failed to keep pace and after going three-and-out on its first possession, Wiggs put Purdue ahead, 10-7, with a 20-yard field goal. Wiggs then made the score 13-7 with a 42-yarder early in the second quarter.

However, Wiggs' ensuing kickoff sailed out of bounds resulting in a penalty, and the ball was placed at the MSU 40-yard line. On the first play of the drive, Cousins connected with tight end Charlie Gantt for a 55-yard pass play to set up a 4-yard touchdown pass to fullback Andrew Hawken for a 14-13 lead.

Later in the second quarter, the Boilermaker offense once again faced little resistance from the Michigan State defense and needed just four plays to cover 64 yards, including Bolden's 9-yard touchdown run for a 20-14 lead.

However, Bolden was flagged for a 15-yard excessive celebration penalty when he hugged Purdue mascot, Boilermaker Pete.

Michigan State started its next drive with decent field position at the 30-yard line, and drove to the Purdue 11 before settling for a 28-yard Swenson field goal to get the Spartans to within three points with 1:49 remaining in the first half.

Swenson scored MSU's next points as well, tying the score at 20-20 with a career-long 52-yard field goal that capped the first possession of the third quarter.

The Boilermakers regained the lead when Elliott completed a 3-yard touchdown pass to wideout Cortez Smith who was wide open in the right side of the end zone. Safety Marcus Hyde was the closest Spartan to Smith, and he was 10 yards away.

Swenson's second 52-yarder made the score 27-23 late in the third quarter.