STANFORD, Calif. (AP) As soon as Stanford threw a tying touchdown pass, Gardner Minshew's first reaction was that the Cardinal left Washington State too much time with 1:25 to play.

With one deep pass over the middle and a clutch kick that proved to be true and the Cougars are now all alone in first place in the Pac-12 North.

Minshew completed his first 19 passes of the second half and drove No. 14 Washington State to a 42-yard field goal by Blake Mazza with 19 seconds remaining to lead the Cougars to a 41-38 victory over No. 24 Stanford on Saturday.

''That's too much time. We had three timeouts,'' Minshew said. ''We want the ball to come to us. We want to have the chance to make the play to win the game. ... We knew if we got the chance, we could win it for us.''

Minshew completed 40 of 50 passes for 438 yards and three touchdowns to lead the Cougars (7-1, 4-1 Pac-12) to their third straight win over the Cardinal (5-3, 3-2). This victory follows last week's over then-No. 12 Oregon, giving Washington State back-to-back wins over ranked opponents for the first time since 2002.

Minshew engineered the winning drive in the final 1:25 with the big play coming on a 35-yard pass to Jamire Calvin on third-and-2 from the 33. Minshew completed one more pass to move the ball to the 25 and after two incomplete passes, Mazza made his kick to win it in his first try at a game-winner at any level.

''It's exhilarating and it's awesome,'' Mazza said. ''Those are the two things that describe that moment. Only a certain amount of people can experience that in sports.''

With No. 15 Washington losing at California, the Cougars head into the final month of the season alone in first place in the conference and remain the only one-loss team in the Pac-12.

''On Sunday, I'm not sure we can beat Pullman Junior High. On Thursday, I think we can beat an All-Star team of the Eagles and Patriots. This is not a business for rational people. That's not why people come to the game to see what's supposed to happen. They want to be surprised.''

K.J. Costello threw a game-tying 25-yard touchdown pass to JJ Arcega-Whiteside with 1:25 to play but it wasn't enough to prevent Stanford from losing for the third time in four games.

Costello threw for 323 yards and four touchdowns but made a key mistake when he threw short to Bryce Love on fourth-and-3 from the 32 in the fourth quarter. Love was stopped for a 1-yard loss and the Cougars drove down for a TD.

''Learned a couple lessons,'' coach David Shaw said. ''It's hard. You can't check the ball down on fourth-and-(3), unless the check down is beyond the first-down marker. That was a tough play.''

THE TAKEAWAY

Washington State: The Cougars fell behind 28-14 late in the first half before seizing momentum. Minshew led a 69-yard field-goal drive in the final 1:04 of the second quarter and the Cougars then got a second TD run by James Williams on the opening drive of the second half. They tied it early in the fourth on a 7-yard pass from Minshew to Tay Martin.

Stanford: The Cardinal have turned into a pass-first team, throwing 43 times compared to 23 runs with some of those coming on sacks and scrambles. Arcega-Whiteside had 10 catches for 111 yards and two TDs, Kaden Smith had nine catches for 112 yards and a TD and Houston Heimuli also caught a touchdown pass.

FLY AWAY

Minshew provided a highlight running as well. He scrambled for on a key drive in the fourth quarter for 4 yards on third-and-5, nearly performing a flip out of bounds as he fought for the marker. He then converted the fourth down with a keeper, setting up a go-ahead 3-yard TD pass to Renard Bell.

''I was trying to set the high-jump record right there,'' he said. ''I thought they should have given me the first down because I imagine it looked cool. It felt cool. That was pretty wild.''

SPREAD IT AROUND

Minshew completed passes to 10 players, with all of them getting at least two receptions. Dezmon Patmon led the way with 10 catches for 127 yards, while Calvin gained 102 yards on just three receptions. Williams had nine catches for 79 yards out of the backfield, while Martin caught five balls, including a TD.

LOVE'S HEALTH

Love has been nursing an ankle injury for most of the season and wasn't 100 percent for this game. He left after hurting himself again in the fourth quarter and finished with 67 yards from scrimmage on nine touches.

''I'd love for somebody to find me a tougher guy in America,'' Shaw said. ''This kid just grinds through it and he pushes through it. He knows this is not a long-term, career-threatening deal.''

UP NEXT

Washington State: Host California on Saturday.

Stanford: Visit Washington on Saturday.

---

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.