TEMPE, Ariz. (AP) Colorado lost two of its best players in the first quarter and the attrition kept coming as one player after another went down.

The Buffaloes rallied around those who were left and pulled a rare road victory.

Steven Montez threw for 337 yards and had three touchdown passes to Tony Brown, and Colorado beat a ranked road opponent team for the first time in 17 years with a 34-31 win over No. 24 Arizona State on Saturday night.

''We were really confident in ourselves, no matter if we're 1, 2, or 3s,'' said Montez, who completed 23 of 30 passes. ''We're confident on everyone on that sideline. They can come in when their numbers' called and perform at a high level and they did.''

Arizona State (3-1, 0-1 Pac-12) won its first three games behind its defense, allowing 21 combined points.

Colorado (3-1, 1-0) had 24 points by halftime and racked up 477 total yards against the Sun Devils, despite playing most of the game without star receiver Laviska Shenault due to injury.

Brown, who had three career touchdowns entering Saturday's game, picked up the slack with nine catches for 150 yards. The defense held when it needed to with Mustafa Johnson, their best pass rusher, out with an ankle injury.

The win was Colorado's first over a ranked road opponent since beating UCLA in 2002, a string of 36 games.

''I'm really proud of our guys. It was a hard-fought win for us,'' Colorado coach Mel Tucker said. ''We had some injuries but guys stepped up. It was that next man mentality. It was a team win, offense, defense, special teams, everyone pitched in.''

Arizona State's Jayden Daniels threw for 345 yards and two touchdowns, connecting with Brandon Aiyuk nine times for 122 yards to keep the Sun Devils within reach.

Montez put Colorado up 31-24 in the third quarter with a 20-yard TD pass to Brown. Daniels answered with a 39-yard TD pass to Frank Darby to tie the game for the fourth time.

James Stefanou gave Colorado the lead back with a 44-yard field goal with 2:03 left and Colorado forced the Sun Devils to turn the ball over on downs.

Arizona State appeared as if it would get one final chance, but was called for roughing the holder while trying to block another Stefanou kick.

''You have to give them credit, they have a really good offense,'' Arizona State coach Herm Edwards said. ''It was a scoring game, going into this, we knew we had put points on the board. We gave them a couple too many.''

A year ago, Arizona State moved into the AP Top 25 with the marquee win of coach Herm Edwards' first season, knocking off Michigan State. The Sun Devils fell flat after that, losing their next two games on the way to a 7-6 season.

Arizona State did it again this season, entering at No. 24 this week after taking down then-No. 18 Michigan State on the road. The Sun Devils looked like they were headed toward a repeat stumble Saturday night, falling into a 14-0 first-quarter hole.

The Sun Devils snapped out of their early game funk in the second quarter, tying the game on Brandon Aiyuk's 29-yard TD catch - he lost his shoe in the process - and the first of Eno Benjamin's two first-half TD runs.

Arizona State just couldn't slow the Buffaloes.

Brown scored his second touchdown on a spectacular 31-yard catch and Montez moved Colorado in position for Stefanou's 25-yard field goal to put the Buffaloes up 24-21 at halftime.

''We have to do a better job when they go tempo of getting line up faster. That's probably the biggest thing,'' Arizona State defensive tackle Evan Fields said. ''I feel like once they started going fast we didn't have enough urgency to get lined up, so they got us out of place and made some plays like that.''

THE TAKEAWAY

Colorado bounced back from its disappointing home loss to Air Force with a stellar offensive performance against what had been a stingy defense.

Arizona State fell flat after entering the rankings for the second straight season, unable to stop the Buffaloes and their unsung star, Brown.

BROWN'S BREAKOUT

Brown played two seasons at Texas Tech before transferring to Colorado and sitting out the 2017 season. The 6-foot-1, 190-pound receiver third on the team in receiving in receptions (32) and yards (333) as a junior last season and came into Saturday's game with 10 catches for 151 yards.

When Shenault went down, Brown became Montez's go-to receiver and he responded with career-highs in catches, yards and touchdowns.

''He's extremely talented. Just super hard-working guy. He just worked his butt off and now is his time,'' Montez said. ''He's starting to get touches and show everyone he's a dynamic player. Very excited for Tony, very happy for Tony. I hope to see him do this all year.''

UP NEXT

Colorado hosts Arizona on Oct. 5.

Arizona State plays at No. 23 California next Saturday.

---

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

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.