AUSTIN, Texas (AP) A season of high expectations for Texas still fell far short of its promise, and coach Tom Herman may still shake up his staff.

Yet Sam Ehlinger and the Longhorns closed out the regular season with an emphatic victory that will guarantee a winning record regardless of what happens in the bowl season.

Ehlinger passed for two touchdowns, ran for another and the Longhorns rallied from an early hole for a 49-24 win over Texas Tech on Friday.

''We all know this is not where we hoped we would be to begin the season, but to send these seniors out (with a win) that was our mission,'' Herman said. ''Nothing that happened prior to this week mattered.''

Texas fell behind 14-0 in the first quarter before Ehlinger and the Longhorns came roaring back. Ehlinger scored his first rushing touchdown in five games, and later connected on scoring strikes of 75 yards to Devin Duvernay and 26 yards to Jake Smith.

Ehlinger finished with 348 yards passing and ran for 83 yards on 10 carries. Roschon Johnson added 105 yards rushing and three touchdowns.

Texas (7-5, 5-4 Big 12) started the season ranked in the Top 10 after last season's Sugar Bowl victory and figured among the favorites for the Big 12 title. But the Longhorns stumbled badly over the second half of Herman's third season and a loss Friday would have meant Texas had to win its bowl game to have a winning season.

Texas avoided that kind of December pressure thanks to the Longhorns offense playing its best football since early October.

Herman said Friday's win sent a message that the program is ''going to be okay,'' even as he evaluates whether to make staff changes in the offseason.

''Things are still headed in the right direction,'' Herman said. ''The kids are fighting.''

Texas has had at least four losses every season for a decade and went through a stretch of three straight losing seasons before Herman arrived.

Ehlinger, who raised expectations for the program when he declared ''We're back!'' after last season's Sugar Bowl win, said the program is in a good spot despite its slip backward.

''If you had told Texas fans three years ago that we would have seven wins and a headed to a bowl game and had a chance to win eight, I think people would be pretty happy,'' Ehlinger said. ''Overall, we did a great job.''

Texas Tech (4-8, 2-7) jumped out early with two quick touchdown drives as quarterback Jett Duffey was carving up the Longhorns defense. But the Red Raiders also had three drives end on downs deep in Texas territory as Texas Tech's first-year coach Matt Wells chased an upset win to end the season. Duffey passed for 398 yards.

''We needed touchdowns and I wanted to be aggressive,'' Wells said.

THE TAKEAWAY

Texas Tech: The Red Raiders were already suspect on defense and badly missed linebacker Jordyn Brooks, their leading tackler. Brooks is a finalist for Butkus Award given to the nation's best linebacker and he was a pregame scratch from the lineup because of a shoulder injury. His absence was most notable every time Ehlinger took off running up the middle of the field.

Texas: After a four-game slump, the Longhorns played the kind of offense that was on display at the beginning of the season when they started 5-2. Ehlinger passed for more than 300 yards for the fourth time this season and Duvernay topped 100 yards receiving for the sixth time.

JUST MISSED

Duvernay had 199 yards on six catches, just missing on being just the third Texas receiver to gain at least 200 yards and the first since Jordan Shipley had a school record 273 yards against Central Florida in 2009.

BIG PRESSURE

Texas has struggled to pressure opposing quarterbacks all season. That changed Friday as the Longhorns sacked Duffey four times, the most in 10 games.

Senior defensive tackle Malcolm Roach had one of the sacks.

''Not a lot was on the line,'' Roach said. ''We really had nothing to lose.''

UP NEXT

Texas Tech: The Red Raiders' season is concluded.

Texas: The Longhorns await their bowl destination.

---

More AP college football: https://apnews.com/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.