SHREVEPORT, La. (AP) -- Jason Ricks had attempted only 10 field goals this season for Oklahoma State, and he had missed a couple of PATs that cost the Cowboys a victory.
None of that matter at the PetroSun Independence Bowl on Thursday, when the sophomore kicker teamed with Dantrell Savage to help snatch victory back from Alabama.
Ricks kicked a 27-yard field goal with 8.9 seconds remaining after to give Oklahoma State a 34-31 victory over Alabama.
"That's what I was looking for," Ricks said. "When you have that opportunity, you want to make the most of it."
Savage ran for 112 yards and a touchdown and made the key play on the winning drive. He took a screen pass from Bobby Reid for 26 yards on third-and-9 to the Alabama 15 to put Ricks in prime position.
Alabama tried to ice Ricks with three timeouts.
"I saw the three timeouts on the scoreboard, and I had the feeling they would call all three," Ricks said.
But the sophomore sent the kick through the uprights, and he snatched off his helmet and ran to the sideline with it extended over his head.
"It took a lot of time to get it off," Oklahoma State coach Mike Gundy said. "Our offensive staff worked on some plays to get the ball in the middle of the field. The snap was a little low, but it was a great hold and Ricks just drilled it."
The kick saved the Cowboys (7-6) from a fourth-quarter collapse and gave them both a winning record and their first bowl victory since 2002. Oklahoma State blew a 14-point lead, setting up the Crimson Tide for the tying touchdown with a fumbled kickoff return.
"We've had to fight back with some huge emotional swings," Gundy said. "And it's evident that our team has learned to overcome adversity."
Alabama (6-7) was playing in its NCAA-record 54th bowl game and looking for its 31st bowl victory -- another NCAA record -- but for much of the night the Crimson Tide's vaunted postseason history seemed a distant memory. Bama played flat until late in the fourth quarter.
With the Tide trailing 31-17, Javier Arenas returned a punt 86 yards to pull Alabama to within a touchdown with 10:50 left in the game.
Then Grant Jones fumbled the ensuing kickoff and Chris Rogers -- who forced the fumble -- recovered, giving Alabama a first down on the Oklahoma State 21. Six plays later, left tackle Andra Smith caught a lateral from John Parker Wilson and ran 2 yards to tie the game at 31.
It was a bitter end to a bitter year for the Tide. Playing for the first time since Mike Shula was fired, Bama was unable to dodge its first losing record since 2003, Shula's first season.
Alabama is without a coach for next season after being turned down by West Virginia's Rich Rodriguez. Defensive coordinator Joe Kines has handled the head coaching duties in the interim.
"I would give anything to be the head coach at Alabama," Kines said. "This isn't an election. I don't know where to go from here. This is the greatest job in America, and I hope to stay in some capacity."
Oklahoma State -- ranked 16th nationally in total offense -- outgained Alabama 419-276. The Cowboys rushed for 207 yards compared to 108 yards for the Tide.
Jeremy Nethon had 11 tackles including seven solo for Oklahoma State and was selected the game's MVP.
"We're a quality team and proved it today," Nethon said. "The win will carry us into the offseason on a positive note, and it really helps."
Reid completed 15 of 29 attempts for 212 yards with a touchdown and an interception, and Keith Toston added 58 yards and two TDs.
John Parker Wilson completed 18 of 33 for 168 yards and a touchdown for Alabama. He was intercepted twice.
The Cowboys scooped up an Alabama fumble on the Tide's 38-yard line to set up the opening score. Savage ran the final yard to cap a 38-yard drive and make it 7-0 Oklahoma State.
Alabama tied it on an 18-yard touchdown pass from Wilson to Matt Caddell with 3:32 remaining in the first quarter.
Oklahoma State went ahead 14-7 on Toston's 4-yard run. The Cowboys stretched their lead to 17-7 on a 28-yard field goal by Ricks.
Alabama cut the margin to 17-14 on a 1-yard run by fullback Tim Castille. But Alabama was unable to stop the Cowboys final drive of the half. Oklahoma State took it 64 yards, capped by a 7-yard run by Toston for a 24-14 lead at the half.
In the third quarter, Jamie Christensen kicked a 24 yard field goal to pull Alabama three points closer.
Then Reid hit Adarius Bowman for a 10-yard score to give Oklahoma State a 14 point lead, 31-17.