STILLWATER, Okla. (AP) -- Taylor Martinez went from running himself into the Heisman Trophy race to getting benched, only to re-emerge as a sudden passing sensation.
Martinez set a Nebraska freshman record with 323 yards passing, threw a career-high five touchdown passes and the 14th-ranked Cornhuskers knocked No. 17 Oklahoma State from the ranks of the unbeaten with a 51-41 win on Saturday.
Martinez, who came in trailing only Michigan's Denard Robinson in yards rushing by a quarterback, showed off his arm while also running for 112 yards on 19 carries.
"I've seen him do it day after day. I promise you he's no different now than he was going into this game," coach Bo Pelini said. "I think this game hopefully will keep giving him more confidence.
"He threw it all over the field. He made some great throws in that game, and he showed what we knew he was capable of doing. He can hurt you with his feet. He can hurt you with his arm."
Brandon Kinnie caught the first three touchdown passes of his career, including an 8-yard lob from Martinez that made it 51-34 in the final 5 minutes. Martinez finished 23 for 35 and ended up with bigger passing totals than Oklahoma State's Brandon Weeden, who had been second in the nation with 327.6 yards per game.
"We finally showed everybody else that we can throw the ball like this instead of us just dropping back and running," Martinez said.
Martinez had only three touchdown passes and had never thrown for more than 150 yards in his first six starts. He even got benched in favor of Zac Lee after the Cornhuskers fell behind Texas in a 20-13 loss last week.
He proved more than capable of picking on an Oklahoma State defense ranked 114th in the country against the pass, easily eclipsing 2001 Heisman Trophy winner Eric Crouch's 193 yards passing that had been the Nebraska freshman record.
"I don't know if that was the right decision last week, to pull him out of the game. It sure wasn't because we lost confidence in him," Pelini said. "It's all part of the learning process. ... All those experiences are going to make him stronger as we go down the road."
Martinez rallied the Huskers for the go-ahead score with 55 seconds left before halftime, delivering a 9-yard touchdown pass to Kinnie for a 31-27 lead. Then he kept Nebraska ahead by evading the Cowboys' pressure with some impressive throws downfield.
"He is the master of the art of escape. We had him all but down a lot, but he was able to get away," Oklahoma State defensive end Richetti Jones said. "We were surprised that he threw the ball that well. He did a great job of throwing the ball even though he isn't known for that."
Kendall Hunter ran for 201 yards and two touchdowns in trying to lead Oklahoma State (6-1, 2-1 Big 12) to only the third 7-0 start in school history, but Nebraska (6-1, 2-1) clamped down after a high-scoring first half and forced the Cowboys to go three-and-out on three of their four drives in the second half.
Kyler Reed beat Andrew McGee, the most experienced member of the Cowboys' young secondary, deep for a 41-yard touchdown pass from Martinez that made it 41-27 midway through the third quarter and even Oklahoma State's high-powered offense couldn't recover.
Hunter cut the deficit in half with a 1-yard TD run on the Cowboys' ensuing drive, but Oklahoma State then went three-and-out on its next two possessions as Nebraska added to its advantage.
"It was just almost a pride factor going out there and knowing that our offense was scoring points but we were giving up too many points," Nebraska safety DeJon Gomes said.
Nebraska hadn't given up more than 21 points in 14 straight games - the longest streak in the nation - before Oklahoma State got there on Justin Blackmon's 80-yard TD catch on a flea flicker to give OSU a 27-24 lead with just under 6 minutes left in the first half.
Blackmon, the nation's leading receiver, finished with five catches for 157 yards and two touchdowns but was a non-factor in the second half until he caught a 25-yard TD pass with 1:24 left that only got OSU back within 10.
Weeden finished with 283 yards on 18 for 35 passing with two touchdowns and one interception.
Alex Henery hit field goals from 52, 32 and 45 yards to surpass Kris Brown's school records with 17 straight successful field goals and 59 makes for his career.
Niles Paul, who was responsible for two of Nebraska's four dropped passes that could've gone for touchdowns in the loss to Texas last week, bounced back with a career-high 131 yards receiving and Nebraska's first 100-yard kickoff return for a score since 1949.