STANFORD, Calif. (AP) The defense was opportunistic all night, the running game was productive and Utah even delivered some big plays through the air for a change.

After two straight losses to open the Pac-12 season, the Utes finally put everything together.

Jaylon Johnson returned an interception 100 yards for a touchdown and Zack Moss ran for two scores, leading Utah to a 40-21 victory over No. 14 Stanford on Saturday night.

''It's been a rough couple of weeks, a couple of tough losses,'' coach Kyle Whittingham said of games against Washington and Washington State. ''I'm proud of the way the guys rebounded. Total team effort.''

Moss ran for 160 yards and the Utes (3-2, 1-2) intercepted K.J. Costello on back-to-back first-half drives in the red zone to snap an 11-game home winning streak for the Cardinal (4-2, 2-1).

Utah ended a six-game skid against Top 25 teams with its first win over a ranked program in three years.

Johnson picked off a pass at the goal line and raced down the sideline for the third 100-yard interception return in school history and first since Harold Lusk did it in 1994 against Colorado State.

''They love jump balls in the end zone,'' Johnson said. ''The way he threw it, I knew that I was able to undercut it. I just had to make a play after I caught it.''

Stanford then drove back down the field only to have Costello give the ball away again when he tried to throw it away to avoid a sack. The ball instead went right into the hands of 300-pound defensive lineman Hauati Pututau.

''Can't throw the ball while we're getting sacked. Can't throw the ball flat when we need a jump ball,'' coach David Shaw said. ''Pretty straightforward.''

The Utes then drove down the field and made it 21-0 on Moss' 35-yard run on fourth-and-2.

Costello tried to lead a comeback for the Cardinal on a night when star running back Bryce Love was missing with an injured ankle. Costello threw for 385 yards and cut the deficit to 27-21 late in the third quarter with a 26-yard TD pass to Michael Wilson.

But Utah added a field goal, sacked Costello to get the ball back and then delivered a knockout blow when Tyler Huntley narrowly avoided a sack and lofted a 57-yard TD pass to Samson Nacua that made it 37-21 and gave the Utes their first TD pass of the season against an FBS team.

''I just knew Samson was going to make a play so I held the ball up long enough to let him make a play,'' Huntley said. ''He made a play and scored.''

THE TAKEAWAY

Utah: Whittingham was aggressive for much of the night. He went for it on fourth down in the first half and was rewarded by Moss' long run. Then after the Cardinal scored with 24 seconds left in the half, the Utes went for it and that paid off as well when Utah moved the ball 45 yards to set up Matt Gay's 48-yard field goal that made it 24-7 at the break.

Stanford: The Cardinal have uncharacteristically struggled to run the ball this season and the problem only got worse with Love sidelined. Cameron Scarlett and Trevor Speights were unable to generate any consistency, and Stanford was held to just 42 yards on 28 carries.

SLOW STARTS

The Cardinal allowed the first score for the fifth time in six games. Stanford has been outscored 38-14 overall in the first quarter.

''We didn't start out the way we wanted. It's unfortunate but it's been a recurring theme,'' Costello said. ''We play really good quarters and we have to fight like hell to play a complete game.''

STAT CORNER

Kaden Smith, JJ Arcega-Whiteside and Trenton Irwin all topped 100 yards receiving for Stanford. That's the first time the Cardinal had three players do that in the same game since Deronnie Pitts, Troy Walters and Dave Davis against Oregon State on Oct. 10, 1998.

UP NEXT

Utah: Hosts Arizona on Friday night.

Stanford: Visits Arizona State on Oct. 18.

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.