FORT WORTH, Texas (KXAN) — Texas Longhorns head coach Steve Sarkisian said it wasn’t pretty, but his team’s grit pushed them to a 32-27 win Saturday over TCU in Fort Worth.

It was the first win in eight years for the Longhorns program at Amon G. Carter Stadium, and while there are plenty of things Sarkisian said his team has to clean up, when it mattered most, the Longhorns got it done.

“We’ve been talking about 3-4 months about the resolve of our team. They’ve been through a lot and continue to bounce back,” Sarkisian said. “We kept grinding away and didn’t panic.”

There were times where the Longhorns could have panicked, especially after an 87-yard opening kickoff return by J.D Spielman set up the Horned Frogs on their 13-yard line. Two plays later, Zach Evans scored for the Frogs on a 12-yard run and less than a minute into the game, Texas trailed 7-0.

Another play Sarkisian said could have turned the game was in the fourth quarter when running back Bijan Robinson was turned back twice on the 2-yard line to give the Horned Frogs the ball back with 9:32 left in the game. TCU drove 99 yards to score and get the game back to within five points, but Robinson iced the game with a tough third-down run to ice the game late.

Sarkisian said Robinson has “earned that trust,” to have the ball in his hand in those situations.

“He’s a guy, whether it’s on the field or off the field, who he is as a person, from a preparation standpoint, and understanding what we’re trying do, he’s earned our trust,” Sarkisian said. “Quite frankly, that was why I went for it on the goal line.”

Robinson finished with a career-high 216 yards on 35 carries, and few were more important than the 34th one which got the Longhorns the first down they needed to run out to clock to secure the win.

Texas quarterback Casey Thompson struggled in the first half, but Sarkisian said his “gritty” performance was enough and Thompson came through when he had to.

“He had a couple critical runs for us where he tucked it and ran, and the touchdown pass to (Jordan) Whittington on an RPO was a huge play in the fourth quarter,” Sarkisian said. “All in all, Casey fought and he competed.”

Thompson finished 12 of 22 passing for 142 yards with a touchdown and an interception. In the play Sarkisian mentioned, he hit Whittington for 32 yards to give the Horns a 32-30 lead with 13:46 to go.

Texas had nine penalties for 97 yards, and TCU quarterback Max Duggan completed 20 of 28 passes for 182 yards. TCU running back Zach Evans 113 yards on 15 carries and a touchdown, but TCU head coach Gary Patterson told media members that Evans was “tired” and they “couldn’t run the ball like they wanted to.”

Sarkisian said despite the win, “This was an ugly football game.” Texas forced three turnovers but failed to score touchdowns off of them, although Cameron Dicker converted field goals on all of them.

“You gotta find a way to find a way,” he said. “We were spotty, at best, in the red area and we had opportunities to capitalize and extend the lead. Our run game had to step up, and we leaned on No. 5 (Robinson) for that.”

The Longhorns, who entered the week just outside the AP Top 25 poll, moved to 4-1 with the win and 2-0 in Big 12 Conference play. The loss dropped TCU to 2-2 overall.