Updated

Arizona State coach Todd Graham wanted to give credit where it was due: To Oregon State.

"I don't want to sit up here and be a coach who says, 'We beat ourselves,'" Graham said following the seventh-ranked Sun Devils' 35-27 loss to the Beavers on Saturday night. "Coach (Mike) Riley and Oregon State did a great job, they deserve the credit.

"When you're sixth in the country and go into a place, you're going to get everybody's best performance. We got Oregon State's best shot tonight and we weren't prepared for it."

The Sun Devils (8-2, 5-1 Pac-12), sixth in the College Football Playoff rankings, snapped a five-game winning streak. The loss to the Beavers damaged their bid for a second straight appearance in the Pac-12 championship game.

The Pac-12 South is a jumble between four two-loss teams. The Sun Devils have two more games to jockey for position: Next week at home against Washington State before the regular-season finale at rival Arizona.

"Heck, we're still playing for a conference championship. We've still got an opportunity to win the South," Graham said. "Win the next two games, I believe we'll be there Dec. 5th. That's all we can do. We can't worry about anything else."

The Sun Devils took a 27-21 lead early in the fourth quarter on Zane Gonzalez's 29-yard field goal.

But Sean Mannion answered with a 66-yard touchdown pass to Jordan Villamin early in the fourth quarter, before Michael Doctor's 35-yard interception return sealed the victory for Oregon State (5-5, 2-5).

Mannion threw for 251 yards and two touchdowns as the Beavers snapped a four-game losing streak. He reached 80 career touchdown passes career to move past Derek Anderson (2001-04) for the Oregon State record.

Villamin had four catches for 127 yards, while Terron Ward ran for 148 yards and an early touchdown for the Beavers.

Taylor Kelly threw for 264 yards and two scores for the Sun Devils. He was intercepted twice as temperatures dropped below freezing.

"We were slow executing on third downs and we couldn't get our tempo going," Kelly said. "Giving credit to them, they had a good scheme going today and were well coached. We didn't execute our plan."

The Mike Riley-led Beavers have a tradition of pulling off surprise wins against high-ranked opponents at home. In 2012, the Beavers upset No. 13 Wisconsin — which went to the Rose Bowl that season — at Reser. In 2008, the Beavers were 26-point underdogs when they knocked off then-No. 1 USC 27-21 on a Thursday night in Corvallis. Two years earlier, Oregon State topped the then-No. 3 Trojans at Reser 33-31.

The Beavers struck first, scoring in the first quarter on Storm Wood's 78-yard run. It was the longest touchdown play of the season for Oregon State and longest of Woods' career.

Arizona State's Damarious Randall intercepted Mannion and returned the ball 30 yards to the Oregon State 18, but the Sun Devils settled for Gonzalez's 28-yard field goal to narrow the margin to 7-3.

Oregon State answered with Ward's 66-yard touchdown run. It was also the longest of his career.

Before the first quarter was over, the Sun Devils scored on Kelly's 17-yard scoring pass to D.J. Foster to close to 14-10. Arizona State extended the lead on Kelly's 46-yard scoring pass to Kody Kohl and Antonio Gongino's 36-yard fumble return for a touchdown made it 24-14 at the half. It was their fourth defensive touchdown in four games.

Mannion found Victor Bolden in the end zone with a 20-yard scoring pass to narrow it with 3:19 left in the third quarter. Gonzalez's 29-yard field goal extended the Sun Devils' advantage to 27-21.

Mannion's TD gave Oregon State the lead. The Beavers drew boos when they punted on fourth-and-1 at the Arizona State 45 with 2:52 left, but the Sun Devils' chances faded with Doctor's interception.