On the scoring play, Cook was under a heavy rush by Stanford linebacker Joe Hemshoot when he managed to flip the ball to fullback Trevon Pendleton for a two-yard touchdown.
This time, Kevin Anderson made the catch.
The Stanford linebacker muffed an interception earlier today, setting up a Michigan State touchdown. But given a second chance, he converted in a big way.
Michigan State quarterback Connor Cook threw a pass that never should have left his hand. Under a heavy rush by Usua Amanam, who was coming on a blitz, the Spartans quarterback lofted a short pass so errant that its intended target wasn't clear.
It went right to Anderson, who caught it in stride and ran 40 yards for a touchdown.
So far, punter Ben Rhyne is Stanford's MVP.
His 54-yard punt out of the end zone sticks Michigan State back at its own 41 with 2:51 left in the first half.
Michigan State's first double-digit deficit of the season didn't last long.
Less than six minutes of game time, in fact.
The Spartans drove 75 yards in 13 plays, with quarterback Connor Cook making a couple of big plays and Michigan State enjoying a little luck before Jeremy Langford scored on a run from two yards.
The key play was a pass from Cook to Macgarrett Kings Jr. that went for a 14-yard gain that could easily have been intercepted.
But instead of making a pick, Stanford linebacker Kevin Anderson batted the ball in the air and it found Kings' hands.
Cook also connected with Tony Lippett for a 24-yard pass play, and Cook scrambled away from a heavy rush in order to find time to flip the ball to Trevon Pendleton for another key pickup of 19 yards.
Michigan State's largest deficit of the season before today was when the Spartans trailed Indiana, 7-0.
Michigan State's only loss this season was to Notre Dame by four points.