AMES, Iowa (AP) Iowa State surged back into the Top 25 by making big plays on offense and limiting them on defense.

Oklahoma State stole the Cyclones' recipe, took care of the ball and escaped Ames with a potential season-changing upset. Freshman Spencer Sanders threw for 249 yards and two TDs, and Oklahoma State beat 23rd-ranked Iowa State 34-27 on Saturday to snap the Cyclones' three-game winning streak.

Chuba Hubbard had 116 yards rushing for the Cowboys (5-3, 2-3 Big 12), who used four big plays to snap their own two-game skid. The Pokes also forced three turnovers in the fourth quarter after entering play ranked 123rd nationally in turnover margin.

''This is a great life lesson for the boys from the standpoint of, just keep playing,'' Oklahoma State coach Mike Gundy said.

Malcolm Rodriguez gave Oklahoma State a 34-27 lead with 6:47 to go on an interception he returned 26 yards for the eventual game-winning touchdown.

Iowa State (5-3, 3-2) then stuffed Hubbard on a 4th-and-1 near midfield with just under 3 minutes left. But quarterback Brock Purdy threw another ill-advised pass that was picked off shortly thereafter - then another interception in the final seconds that sealed the Cyclones' fate.

Iowa State was also just 5 of 16 on third downs, and Purdy gave it away three times in the fourth after throwing just four interceptions all season entering the day.

''We really didn't play Iowa State football,'' Iowa State coach Matt Campbell said. ''The big plays obviously, the turnovers, the third downs. I think it's really hard to beat anybody, especially a good team, that way. I put that on us (as coaches).''

Oklahoma State jumped ahead 21-13 at halftime behind a 71-yard catch and run touchdown from Tylan Wallace, a 50-yard touchdown pass from Sanders to Braydon Johnson and a 65-yard scoring run from Hubbard.

Iowa State's defense stiffened in the second half, and touchdown runs of 9 and 4 yards by freshman Breece Hall pulled the Cyclones even at 27-all with 9:06 left.

Purdy, whose brilliant play has been a major reason why Iowa State has been so strong since he took over last season, fell to 9-3 against Big 12 opponents. He finished 39 of 62 passing for 382 yards.

''Interestingly, they beat themselves with a quarterback that's really, really good,'' Gundy said.

Tylan Wallace had eight catches for 131 yards for Oklahoma State, which racked up 34 points despite not reaching Iowa State's red zone.

Hall had 76 yards on 18 carries after posting back-to-back 100-yard games.

THE TAKEAWAY

Iowa State: The longest play the Cyclones had allowed entering the day was 46 yards, so those breakdowns were very uncharacteristic of one of the Big 12's best defenses. The league remains wide open, especially after Oklahoma and Texas lost, but Iowa State squandered a golden opportunity to move up the standings.

It's not all on Purdy though, as Iowa State ran the ball just 25 times in 88 plays.

''It's hard to be the best version of us if we're going to be that unbalanced,'' Campbell said.

Oklahoma State: After turning it over eight times in the past two weeks, Sanders took much better care of the ball - though his third-quarter interception set up Hall's first touchdown run, which cut the Pokes' lead to 21-20. Still, Oklahoma State is just one win away from bowl eligibility with at least three winnable games to go. ''If we open up the passing game, we open up the running game. It keeps defenses on their toes,'' Johnson said.

POLL IMPLICATIONS

This loss should knock Iowa State out of the Top 25.

HE SAID IT

''It just comes down to executing,'' Purdy said. ''The fourth quarter came rolling around and we just didn't execute. I didn't play to the best of my ability when it mattered.''

UP NEXT

Iowa State has next week off. The Cyclones play at Oklahoma on Nov. 9.

Oklahoma State hosts TCU on Saturday.

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.