STILLWATER, Okla. (AP) Ben Grogan made a 37-yard field goal with 32 seconds remaining to lift No. 20 Oklahoma State past Kansas State, 36-34 on Saturday.

Grogan rebounded to make the winner after having an extra-point blocked. Last week, he made field goals from 41 and 40 yards in the final 1:33 to give the Cowboys (5-0, 2-0 Big 12) a 30-27 victory at Texas.

After the Wildcats (3-1, 0-1) built a 28-13 lead late in the second quarter, the Cowboys rallied to take a 33-28 lead on quarterback Mason Rudolph's 3-yard touchdown pass to Brandon Sheperd with 6:06 to go.

More from FoxSports

Joe Hubener scored on an 8-yard run - capping a 94-yard drive - to give K-State a 34-33 advantage with 3:01 left. The quarterback returned in the fourth quarter after spending most of the game on the sideline because of an apparent head injury.

On Oklahoma State's winning drive Rudolph threw a 19-yard pass to Marcel Ateman on a fourth-and-8 play.

Rudolph, who committed three turnovers last week against Texas, bounced back with a clutch performance, completing 34 of 55 passes for a career-high 437 yards and three touchdowns, along with one interception. It was his second 400-yard day in four games.

His output was even more impressive - and crucial to the Cowboys - because their running game struggled all day. Missing their top two running backs, Chris Carson and Rennie Childs, due to undisclosed injuries, Oklahoma State managed only 12 yards rushing in the first half and 49 overall.

Hubener was injured less than 2 minutes into the game. With the next two quarterbacks on its depth chart out with injuries, the Wildcats had to turn to receiving leader Kody Cook.

Initially, Cook was outstanding, completing 9 of 11 passes for 127 yards and two touchdowns, while also rushing for 58 yards on 14 carries, in the first half as Kansas State built a 28-13 lead late in the second quarter.

Oklahoma State adjusted in the second half, and the Wildcats had only 1 yard of total offense in the third quarter. Cook injured his right shoulder early in the fourth.