Texas A&M won its third straight overall and beat the Sooners for the first time since 2002.
The Aggies built a 19-0 lead and withstood a 17-point third quarter rally by Oklahoma before adding two touchdowns early in the fourth quarter.
Texas A&M never trailed and was up 9-0 just three minutes into the game after a bad snap on Oklahoma's first play resulted in a safety and Tannehill threw a quick touchdown pass.
The loss puts Oklahoma (7-2, 3-2) behind in the Big 12 South standings and makes Texas A&M (6-3, 3-2) bowl eligible.
It ends a string of misery against the Sooners that included being outscored 131-38 in the last two meetings. Texas A&M's improved defense was key in this one, holding Oklahoma on fourth-and-1 from the 1 three times.
Landry Jones threw for 290 yards with a touchdown and an interception and DeMarco Murray ran for 80 yards and a touchdown for Oklahoma.
Tannehill hit Ryan Swope on a 64-yard touchdown on third-and-4 in the fourth quarter to put the Aggies comfortably ahead, 33-17, after a missed field goal by Oklahoma. Swope finished with a career-high 136 yards receiving.
Patrick O'Hara's field goal attempt from 36 yards wasn't even close and left Oklahoma down 26-17 with about nine minutes remaining.
Then Texas A&M's defense took control, stopping the Sooners twice from 1-yard out with about five minutes left. The Aggies took over from there, but couldn't get anything going and had to punt. The punt was blocked for a safety to leave the score at 33-19.
Oklahoma gambled with a fake field goal when the holder John Nimmo overthrew James Hanna in the end zone, giving A&M the ball at the its own 32 earlier in the fourth quarter.
The Aggies stopped a streak of 17 straight unanswered points when the Gray spun into the end zone for a 23-yard touchdown run after that miscue to make it 26-17 with about 11 minutes remaining. Gray spun all the way around to evade one tackler and did a second 360 degree spin to roll in for the score.
Jones connected with Trey Franks on a 5-yard touchdown to make it 19-17 A&M in the third quarter.
Oklahoma got the offense going when it capped a 15-play, 71-yard drive with a 1-yard touchdown run by Murray to get within 19-7. Jamell Fleming intercepted Tannehill for the second time of the night on A&M's next drive. The Sooners lost 2 yards on three plays and settled for a 45-yard field goal to cut the lead to 19-10 with about 9 1/2 minutes left in the third quarter.
The Aggies made it 19-0 when Coryell Judie returned the opening kickoff of the second half 100 yards for a score. He broke away from the pack and dashed down the sideline for the touchdown.
Texas A&M had 222 yards to Oklahoma's 111 as the Sooners were shut out in a first half for the first time since 2007.
Oklahoma's first play ended with a bad snap flying over the head of Jones and out of the back of the end zone for a safety. Tannehill's first play turned out a lot better with the quarterback running for 48 yards to get to the Oklahoma 22. Tannehill stretched A&M's lead to 9-0 with a 1-yard touchdown pass to Hutson Prioleau a few plays later.