TEMPE, Ariz. (AP) Arizona State stumbled on offense in the second quarter and its defense gave up three late touchdowns.

The Sun Devils were pretty good the rest of the night, leading to another home-opening win.

Manny Wilkins threw for 300 yards and two touchdowns, Kalen Ballage had two scoring runs and Arizona State opened the season with a 37-31 victory over New Mexico State on Thursday night.

Arizona State jumped out to a quick 14-0 lead, allowed the Aggies back in it, then pulled away in the second half to win its 19th straight home opener.

''Lots of good things, lots of positive things on both sides of the ball,'' Arizona State coach Todd Graham said. ''The biggest thing was we were rolling, probably should have been up 21-0. But (the Aggies) did a good job, had some good things they were doing.''

Wilkins showed off his strong arm on a 60-yard scoring strike to John Humphrey and finished 22 for 27. Ballage had scoring runs of 7 and 20 yards, carrying most of the load with Demario Richard on the sideline with a right-knee injury.

New Mexico State's Tyler Rogers threw for 398 yards and three touchdowns on 40-of-57 passing. He also had two interceptions, including one returned for a 49-yard touchdown by Kobe Williams.

Jason Huntley and Jaleel Scott each scored two touchdowns for the Aggies.

''This is a good football team we played,'' New Mexico State coach Doug Martin said. ''They will be competing with everybody this year. There some positive signs.''

Coming off a disappointing 5-7 season, Graham did not have his contract extended for the first time since arriving in the desert, a possible sign that more losing won't be tolerated.

Arizona State opened the scoring on Ballage's 7-yard run and Jalen Harvey's 53-yard reception in the first quarter.

The Sun Devils went flat from there.

New Mexico State put together two long drives in the second quarter, pulling within 14-13 by halftime on Scott's spectacular 16-yard touchdown catch and Rogers' 1-yard keeper.

Arizona State was better in the second half.

Wilkins threw a perfectly-placed ball on the 60-yard touchdown to Humphrey and Ballage burst through the right side for a 20-yard TD run to put the Sun Devils up 30-13 late in the third.

New Mexico State made a late push, pulling within 37-25 after Huntley scored on a 50-yard run and a 23-yard reception. Scott scored on a 29-yard pass as time expired, but the run came too late.

''We were a little bumpy coming out,'' Rogers said. ''We shot ourselves in the foot with a couple of stupid penalties. I made a couple of dumb decisions on throws. Other than that, we responded.''

THE TAKEAWAY

The Aggies took a while to get going, but had a 549-400 advantage in total yards and got a good defensive push against a Power Five program, which could help them down the road.

Arizona State became discombobulated for a stretch in the first half, but wore the Aggies down to pull away. The Sun Devils will need to play four good quarters, not just three, as the schedule gets tougher.

NO SUBS

Arizona State played the entire first half with the same 11 players on defense, despite it being over 100 degrees at kickoff. The Sun Devils mainly stuck with those players in the second half until the game got out of reach and the reserves came in.

''When we've got guys we can rotate, we're going to rotate,'' Graham said. ''Until they perform in practice, the 1s are going to play a lot of plays.''

AGGIES SACKS

New Mexico State was one of the FBS' worst teams at generating sacks last season, finishing with 11 in 12 games. The Aggies had seven against Arizona State and defensive back Malik Demby had 5 1/2 tackles for loss.

TIME EXPERIMENT

The Pac-12 is testing a pilot program to shorten games for some non-conference games, including shorter halftimes (15 minutes) and breaks between quarters. Thursday night's game was part of the program and clocked in at more than 3 1/2 hours.

UP NEXT

New Mexico State heads to New Mexico on Sept. 9 for the Rio Grande Rivalry. The Aggies ended a four-game losing streak to the Lobos with a 32-31 victory in Las Cruces last season.

Arizona State has a home game against San Diego State on Sept. 9 before facing what could be a difficult road game against Texas Tech on Sept. 16.

---

More AP college football: collegefootball.ap.org and twitter.com/AP-Top25

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