Kyle Phillips/Associated Press

Oklahoma State completed its shocking run through the Big 12 tournament to win its first championship since 2004.

The Cowboys held on for a 6-5 victory over Texas in the conference title game Sunday, earning the automatic bid to the NCAA tournament in the process.

Cliff Brunt of the Associated Press captured the celebration following the win:

Thanks to earlier victories over Texas Tech and West Virginia, the squad also became the first-ever No. 8 seed to win this event.

It was a wild game that featured 24 combined hits and 14 total pitchers, but the Cowboys found a way to survive in Chickasaw Bricktown Ballpark in Oklahoma City.

Aaron Fitt of D1 Baseball described the turnaround for the eventual winners:

Oklahoma State relied on its top-of-the-order stars to carry the load in this one, with Ryan Cash and Garrett McCain each making big plays at the plate throughout the day.

Video Play Button Videos you might like

Cash finished 4-for-5 from the leadoff spot while McCain went 3-for-4, including three different run-scoring hits.

Bryce Fischer also added a 3-for-5 effort, including this home run in the seventh to build a three-run lead:

This ended up being the deciding run with the bullpen holding on for the win.

Neither starting pitcher lasted long in this game as it required a team effort to get through nine innings.

Oklahoma State starter C.J. Varela allowed two runs in the first on the back of three straight hits by the middle of the Texas lineup. The Longhorns eventually built a 3-1 lead for starter Morgan Cooper, who exited after allowing one run in three innings.

The Cowboys made their move from there, tying the game on a two-run single by Cash before McCain followed it up with an RBI single to give them a 4-3 lead after four. All three runs were charged to Connor Mayes, who got just one out on the mound.

Oklahoma State then utilized a handful of impressive defensive plays to stay in front:

Texas eventually fought back in the eighth inning with RBI singles from Zane Gurwitz and Ryan Reynolds to cut a 6-3 lead to 6-5.

However, Carson Teel navigated some trouble to close out the final two innings for Oklahoma State and secure the victory. Blake Battenfield was credited for the win as the first pitcher out of the bullpen.

The Longhorns showed a lot of resolve in the game, fighting back numerous times while finishing 8-for-16 in two-out at-bats (compared to 0-for-9 for the Cowboys). Unfortunately, David Hamilton couldn't come through with the game on the line in the final out, popping up with a runner on second.

Kacy Clemens and Bret Boswell each had three hits in the losing effort.

Despite the loss, Texas should still earn a bid to the NCAA tournament, although its position will come down to the committee. Meanwhile, Oklahoma State also grabbed a spot, and with plenty of momentum, this should be a formidable opponent for anyone in the draw.

Note: All statistics courtesy of the Big 12 official site.