Updated

Taylor Martinez threw a 5-yard touchdown pass to Jamal Turner with 6 seconds left, giving No. 21 Nebraska a 28-24 win over Michigan State on Saturday night that kept the Cornhuskers tied with Michigan atop the Big Ten Legends Division.

The Cornhuskers (7-2, 4-1) scored two touchdowns in the final 7:02 to erase a 24-14 deficit. The winning score was set up by a pass interference call in the end zone on Michigan State's Darqueze Dennard, which gave Nebraska the ball at the 5 when the Cornhuskers would have otherwise had to attempt a tying field goal.

Le'Veon Bell ran for 188 yards and two touchdowns for Michigan State (5-5, 2-4).

Martinez rushed for 205 yards and two touchdowns, becoming Nebraska's career leader in total offense.

Nebraska is unbeaten in seven meetings with Michigan State, but the Cornhuskers never led this one until the end, after they took over at their own 20 with 1:20 remaining and went 80 yards in nine plays.

Martinez kept the drive alive with a 38-yard completion to Kyler Reed to the Michigan State 20 on fourth-and-10. On third down from the 20, Martinez threw down the right sideline for Kenny Bell, but Dennard was there to reach his right arm out and break up the pass.

It looked like Dennard turned around in plenty of time to make a play on the ball, but he may have impeded Bell's progress with the arm. The flag came out, giving Nebraska a new set of downs.

Martinez found Turner on an out pattern at the left edge of the end zone.

Dennard's penalty wasn't the only one that cost Michigan State. With the score 24-14, Dennard intercepted a pass at his own 4 and weaved his way back for what looked like a long touchdown return. It was nullified by a personal foul during the return on Michigan State's Johnny Adams.

The Spartans ended up having to punt, and Martinez made it 24-21 with his 35-yard touchdown run with 7:02 to play. Less than a minute later, Michigan State was punting again.

The Spartans stopped Nebraska on fourth down near midfield with 3:12 remaining, but the Cornhuskers had timeouts remaining and forced one more punt — on fourth-and-2 from the Nebraska 39. After a low snap, Mike Sadler kicked the ball into the end zone, giving Nebraska plenty of breathing room to start the winning drive.

Martinez became Nebraska'a career leader in total offense, passing 2001 Heisman Trophy winner Eric Crouch with a dynamic first half. With Michigan State ahead 7-0 in the first quarter, Martinez faked a handoff to Ameer Abdullah, who was dropped immediately in the backfield.

Martinez kept the ball and took off for a 59-yard run, which set up his 2-yard touchdown pass to Abdullah.

The Spartans took the lead again on a 46-yard scoring pass from Andrew Maxwell to Tony Lippett, who made the catch with three Nebraska defenders in the area. Martinez answered again, getting a nice block from Kenny Bell and turning up the right sideline for a 71-yard touchdown run that made it 14-all in the second quarter.

With the Spartans ahead 17-14 late in the third quarter, Dennard intercepted Martinez's long pass and returned it 30 yards to the Nebraska 38. Le'veon Bell scored on a 1-yard run 40 seconds into the fourth.

Bell's 11-yard touchdown run opened the scoring for Michigan State with 4:28 left in the first.