With his team trailing Stanford by 10 points in the fourth quarter Saturday night, Utah quarterback Troy Williams found himself right where he was against USC last season when he delivered the biggest performance of his college career.

If he was poised then, he panicked this time.

Interceptions on consecutive passes thrown by Williams into traffic basically enabled Stanford to complete a 23-20 victory at Rice-Eccles Stadium, spoiling the first start of Williams’ senior season as he replaced the injured Tyler Huntley.

Williams’ comeback against USC is well remembered. But this finish will be tough to forget.

In his absence, due to a shoulder injury, Huntley reminded everyone why he was named Utah’s starting quarterback in August.

Initially, the biggest mystery of the night was why Williams took so long to start finding Ute receiver Darren Carrington II. But then the question became what Williams possibly was thinking, when he threw those up-for-grabs passes that were intercepted.

“I’ve just got to play better, bottom line … I’m going to continue to say that,” Williams said.

After a 68-yard touchdown run by Bryce Love gave Stanford a 23-13 lead in the fourth quarter, the Utes’ subsequent three possessions ended with an interception, another interception and a touchdown pass that came too late — with only 44 seconds remaining. Not even Stanford’s two foolish roughing-the-passer penalties were enough to help the Utes salvage a victory.

For a moment, signs had emerged of another potential Williams-led rally. He connected with Carrington and drove the Utes well into Stanford territory. But then everything crumbled.

Under heavy pressure, Williams desperately lofted a pass down the field. Stanford’s Quenton Meeks made the interception. The Utes quickly got the ball back, only to have Williams’ next pass picked off by Justin Reid.

Williams knows what comes with being a quarterback, after starting every game last season when the Utes finished 9-4. “It’s just a part of the game: They love you one minute, they hate you the next,” he said.

Utah’s 95-yard drive for the last-minute touchdown allowed Williams to finish with some decent numbers, going 20 of 39 for 238 yards – although Ute coach Kyle Whittingham was not approving of a completion rate in the 50-percent range. “We’ve got to more efficient throwing the ball,” he said.

Williams also deserves credit for his toughness after absorbing those two targeting shots. Carrington’s statistics ended up looking good: seven catches for 99 yards and a touchdown.

But “we didn’t do enough good things to win that game,” Whittingham said, pointing to “lack of points, lack of takeaways.”

It would have become a good story if Williams had produced another comeback to keep the Utes unbeaten, but he couldn’t come close to matching that performance.

In August, when he announced Huntley as the starter, Ute coach Kyle Whittingham basically predicted that Williams would be needed at some point. That was good strategy, designed to keep the senior co-captain engaged in the operation.

And the moment came two weeks ago at Arizona, where Huntley was hurt. Williams took over and remained in the position during an off week, then started Saturday’s game with Huntley unavailable.

Williams became like Terrance Cain in 2010 and Jon Hays (temporarily) in 2012, as seniors who lost their jobs but were summoned due to Jordan Wynn’s injuries.

In the first half, Williams led drives to a touchdown and a field goal as Stanford took a 13-10 lead. The highlight of Williams’ effort was an underthrown pass that Raelon Singleton turned into a 36-yard completion.

Like a lot of quarterbacks, Williams looked good when he was asked to deliver short passes and was highly erratic when Stanford pressured him. He usually managed to escape the rush, but couldn’t turn his scrambling efforts into completions. That’s one of Huntley’s strengths, and running for positive yards is another.

So Stanford finally solved its Utah problem. The Utes had won both meetings between the schools in the Pac-12 era, in 2013 and ’14. As Whittingham approached his 100th career victory last season, Stanford coach David Shaw said, “Along the way, they kicked my backside twice.”

Shaw was being nice, considering one loss came when the Cardinal were stopped at the 6-yard line and the other was a double-overtime game. Regardless, Stanford came through in the end this time.

The Utes can hope Huntley is healthy enough next week to face USC, and that their defense does a better job against USC quarterback Sam Darnold than it did against Love. As Utah contends for a Pac-12 South championship, a win over USC would pretty much make the loss to Stanford forgivable.

But that’s asking a lot at this point, after the Utes failed to deliver a potential homecoming victory that got away from them in the fourth quarter. The outcome left Williams wishing for one more chance.

“I just have to come back stronger next week, if I am in there,” he said.