TEMPE, Ariz. -- Stanford controlled the ball on offense, prevented big plays on defense. The Cardinal put together a couple of key scoring drives and limited Arizona State's chances for a comeback.
It's just the way Stanford wins game -- and just what the Cardinal needed after a two-game losing streak.
K.J. Costello threw for 231 yards and a touchdown, and Stanford remained in the thick of the Pac-12 North Division race with a 20-13 win over Arizona State on Thursday night.
"We could have played better, obviously, but for us, this is the way we needed to win this football game," Stanford coach David Shaw said. "What we've done the last couple games, coming up short, not giving ourselves a chance, we gave ourselves a chance today."
Stanford dropped out of the College Football Playoff picture and the Pac-12 North lead with losses to No. 4 Notre Dame and Utah.
Arizona State was maybe not a must-win game, but the Cardinal certainly could have used it after being outscored by a combined 68-38 the previous two games.
Stanford (5-2, 3-1) needed a half to get its offense fully rolling off a bye week, held to a pair of field goals in the first half. The Cardinal put together a pair of impressive drives in the third quarter and had a 16-minute advantage in time of possession to tie No. 14 Washington atop the Pac-12 North.
Arizona State (3-4, 1-3) was held to a field goal in the first half before Manny Wilkins scrambled for a 10-yard touchdown run in the fourth to pull the Sun Devils within 20-13.
Arizona State got the ball back at its own 16 -yard line with 2:20 left, but couldn't get off a final play from Stanford's 20 after a short gain.
Wilkins threw for 353 yards, but the Sun Devils turned it over three times, including one on a failed trick play, to lose for the fourth time in five games.
"We were in position to score points and the turnovers hurt us," Arizona State coach Herm Edwards said. "You can't do that against a good football team and Stanford is a good football team, no doubt about that."
Neither offense could gain much traction in the first half.
Arizona State had a good drive going late, but failed on a trick play when receiver N'Keal Harry's pass off a reverse was intercepted at Stanford's 11.
The Cardinal appeared to have a touchdown when Cameron Scarlett turned a screen pass into a 59-yard score, but it was called back on a holding penalty.
Jet Toner hit his second field goal, from 31 yards, on the final play of the half to put Stanford up 6-3.
"The three points we gave them, the interception in the red zone, you take those plays back, get a field goal or a touchdown, it's a different ball game," Wilkins said.
Arizona State opened the second half with Brandon Ruiz's second field goal.
Stanford opened by dominating the Sun Devils on a pair of long scoring drives to take control.
Costello hit JJ Arcega-Whiteside on a 28-yard touchdown pass on the first drive, and Scarlett scored on a 1-yard dive to put the Cardinal up 20-6.
"We ran the ball against a team that's really difficult to run the ball against, threw the ball when we needed to, made some big plays," Shaw said.
Stanford still has control of the Pac-12 North with an impressive road victory that prevented the Cardinal's first three-game losing streak in eight seasons under coach Shaw.
The Sun Devils now have win three of their final six to become bowl eligible in their first season under Edwards. It won't be easy, with road games against USC, Oregon and Arizona still left.
Stanford running back Bryce Love returned after missing the Utah game with a left ankle injury. He was not fully healthy against the Sun Devils, but did show bursts of explosiveness before Shaw opted to take him out in the second half.
Love finished with 21 yards on 11 carries.
"Once he got warm, got loose, there were a couple of 4-, 5-yard runs that were really impressive," Shaw said. "He explosiveness in short areas was impressive."
Stanford hosts Washington State next Saturday.
Arizona State plays at Southern California next Saturday.
More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25
Kiper's Big Board for 2019 NFL draft: Top 25 prospects and positional rankings
The Ohio State quarterback keeps rising in Mel Kiper Jr.'s latest ranking of the top prospects for next year's draft.
Edwards, Arizona St. young at heart vs. No. 21 Fresno St.
Arizona State coach Herm Edwards is taking advantage of the extra game Saturday's Las Vegas Bowl presents by making sure his youngest players get valuable experience against No. 21 Fresno State.
A's Bob Melvin says it's 'exciting' to watch Heisman winner Kyler Murray
A's manager Bob Melvin said Tuesday that it's "exciting" to watch Heisman Trophy winner and prized baseball prospect Kyler Murray play quarterback for Oklahoma, but acknowledged "it's kind of tough" to watch him scramble.
FPI's guide to Capital One Bowl Mania
Picking the result of every single bowl game could be tough, but using the FPI data and Vegas lines, this breakdown can be your guide to victory.
Boston College gives 2-year extension to Steve Addazio
Steve Addazio, who is 38-38 in six seasons as coach at Boston College, has been given a two-year contract extension through the 2022 season, it was announced.
Temple coach is fired up for the Independence Bowl
Temple interim head coach Ed Foley promises the city of Shreveport that his team will be ready to play really hard against Duke.