STILLWATER, Okla. (AP) Only guaranteed one series, third-string quarterback Brock Purdy made it count and ended up playing the rest of the game for Iowa State.

Purdy completed 18 of 23 passes for 318 yards and four touchdowns, and also rushed for a touchdown, to help Iowa State beat No. 25 Oklahoma State 48-42 on Saturday.

A true freshman who had played just one series before this game, Purdy stepped in for Zeb Noland - who was starting his fourth straight game in place of injured starter Kyle Kempt - on the second series and immediately sparked Iowa State (2-3, 1-2 Big 12).

''I'm really proud of our football team today,'' coach Matt Campbell said. ''We told Brock that he'd play the second series and see what happened from there. I just thought there were some things that he could open up for us. I thought he did a really good job today. He's a guy that has playmaking abilities.''

The Cyclones entered the day ranked last in the Big 12 in both scoring (17.5 points per game, 122nd in the nation out of 130) and yards (299.5 per game, 123rd overall) but reached season highs in both categories, amassing 465 yards overall.

With Iowa State missing leading rusher David Montgomery because of an upper body injury, Purdy also led the Cyclones in rushing. He had 84 yards, including a 29-yard TD run, on 19 carries.

''I think it forces another threat that (opponents) have to be ready for,'' Campbell said about Purdy's ability to run. ''He gives you a little bit of everything. I think that's important and it is certainly something that he brings to the table.''

Oklahoma State defensive coordinator Jim Knowles admitted that his team wasn't sure what to expect when Purdy entered the game and Montgomery didn't play.

''The first couple of series were three-and-out, so you thought, `OK, we're going to get what we had planned for,' and then we got a lot of things that we had not planned for,'' Knowles said. ''It was difficult to kind of hone in on it, to get down to what they were doing. I thought we did eventually, but it took too long, and that's where you give up too many points, while you're trying to adjust.''

Tyler Cornelius was 19 of 33 passing for 289 yards and four touchdowns for Oklahoma State (4-2, 1-2), which lost its second consecutive home game. The Big 12's leading rusher, Justice Hill, was limited to 66 yards on 24 carries, a 2.8-yard average. He did score a touchdown in his 12th straight game, which set a new Big 12 record.

''Our protections weren't very good,'' Cowboys coach Mike Gundy said. ''We got into too many situations where we put pressure on Taylor and forced him to run out of the pocket. That was a big factor offensively, just not being able to protect and get the ball thrown down the field.''

Purdy and Cornelius had one interception apiece.

Iowa State won its third consecutive game on the road against a ranked opponent.

TAKEAWAY

Iowa State: The Cyclones just needed an effective quarterback to get their offense going. In addition to Purdy, the Iowa State backup running backs also stepped up in Montgomery's absence. Kene Nwangwu, who was listed as the fourth stringer, had 49 yards on 10 carries, while Sheldon Croney scored on a 12-yard touchdown run.

Oklahoma State: There is some frustration among the home fans with the offensive line's inability to protect Cornelius adequately on passing plays, allowing seven sacks, and to block on rushes. And Hill, who rushed for 189 yards last week and topped 100 in four of the previous five games this season, went just eight yards in his longest run in this one.

POLL IMPLICATIONS

There's no question that this loss drops Oklahoma State out of the Top 25, and it will likely take at least one or two more impressive-looking victories for them to claw their way back into the poll.

TURNING POINT

Iowa State led 40-35 midway through the fourth quarter when Oklahoma State got the ball on their own 12-yard-line. On second-and-10, Cornelius launched a deep bomb that appeared to be a sure touchdown for Tylan Wallace, who had gotten behind the Iowa State defender, but Wallace couldn't hold on to it and the ball fell incomplete. Another incomplete pass later, the Cowboys were forced to punt. Two plays after that, Purdy connected with Tarique Milton for a 60-yard touchdown that sealed the victory for the Cyclones.

''Those things happen,'' Cowboys offensive coordinator Mike Yurcich said of Wallace's drop. ''He is a great player. Even Jerry Rice dropped a ball here and there.''

UP NEXT

Iowa State: The path doesn't get any easier for the Cyclones, as they return home to take on No. 9 West Virginia.

Oklahoma State: After losing two straight at home, the Cowboys might be glad to go back on the road next week, facing Kansas State.

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.