Scooby Wright was just focused on stopping Marcus Mariota.

Instead, the Arizona linebacker forced a turnover that stopped Oregon's last drive and helped the Wildcats seal a 31-24 upset against the second-ranked Ducks on Thursday night.

Terris Jones-Grigsby plowed into the end zone from a yard out for the tiebreaking touchdown with 2:54 left. On the Ducks' ensuing series, Mariota was sacked by Wright, who stripped the ball from the Heisman Trophy hopeful and recovered it himself.

Arizona then gained a clinching first down on the ground and ran out the clock.

"I don't know what to think of it," Wright said. "I was just trying to get after the quarterback and saw an opportunity to get after the ball."

Wildcats coach Rick Rodriguez certainly knew what to think of it.

"The play of the game, probably," Rodriguez said. "Scooby's been playing great all year. He was really jacked up to play this game and made a great play against a great player."

True freshman Nick Wilson ran for a pair of scores and caught another to lift the Wildcats (5-0, 2-0 Pac-12), who were 24-point underdogs. It was the second straight season and third time since 2007 that an unranked Arizona team beat an Oregon squad ranked in the top 5.

Arizona has won its first five games for the first time since 1998.

"Nobody gave us a shot but this is a statement that Arizona is here to play," Wright said.

The loss silenced Autzen Stadium's 100th straight sellout crowd and left the Ducks with an uphill climb if they want an invite to college football's first postseason playoff.

With his team trailing 24-14 going into the final quarter, Oregon's Matt Wogan made a 21-yard field goal. Mariota then hit Keanon Lowe with a 9-yard scoring pass to tie it with 8:21 left.

With Arizona driving downfield, the Ducks (4-1, 1-1) sacked Anu Solomon on third-and-8, but Tony Washington was called for unsportsmanlike conduct to give the Wildcats a first down. A pass interference call got Arizona closer for Jones-Grigsby's go-ahead touchdown.

Mariota threw for 181 yards and a touchdown. He also caught a TD pass, but was sacked three times and turned the ball over for the first time all season.

Last November, the No. 5 Ducks lost to Arizona 42-16 in Tucson, dashing any hopes Oregon had of winning a national championship.

"Hats off to them," Mariota said. "They did a good job of covering guys and getting some pressure. It happens. We just have to execute better and obviously learn from it."

Afterward, Oregon offensive coordinator Scott Frost said Mariota wasn't 100 percent after getting sacked seven times in Oregon's previous game, a 38-31 victory at Washington State on Sept. 20.

Solomon, a redshirt freshman, threw for 287 yards and a touchdown for the Wildcats, who jumped out to an early 3-0 lead on Casey Skowron's 28-yard field goal.

The Ducks appeared to still be struggling with their unstable offensive line, with Tyler Johnstone, Andre Yruretagoyena and Jake Fisher all still out with injuries. True freshman Tyrell Crosby and former walk-on Matt Pierson started for the second game at tackle.

Oregon got creative to start the second quarter with Mariota handing off to freshman running back Royce Freeman, who lobbed the ball back to Mariota for a 28-yard touchdown. After a review for what appeared could be a fumble at the goal line, the TD stood to put the Ducks up 7-3.

The Ducks weren't the only ones making unusual plays. Solomon threw a 21-yard pass to himself — helped by a carom off Oregon defensive end DeForest Buckner. The Wildcats made it to the red zone, but Jones-Grigsby fumbled and the Ducks recovered on their own 10.

Arizona opened the second half with a six-play, 80-yard drive capped by Wilson's 3-yard touchdown run to go up 10-7.

Oregon answered with its own scoring drive — helped along by a taunting call on Arizona that gave the Ducks a crucial first down — that ended when Mariota hit Devon Allen with a 6-yard pass to make it 14-10.

Wilson added a 2-yard scoring run to give the Wildcats back the lead. Before the third quarter was over he added a 28-yard TD catch from Solomon to give Arizona a 24-14 advantage going into the final period.

The Ducks were hurt when starting defensive end Arik Armstead left midway through the second quarter with what appeared to be a left foot injury.

Arizona was coming off a bye week after a dramatic, come-from-behind, 49-45 victory over California, won when Solomon hit Austin Hill on a 47-yard Hail Mary on the game's final play.

"I'm really proud of our guys, the way they battled," Rodriguez said. "We didn't play a clean game by any stretch of the imagination, but our defense kept us in it in the first half and our offense started executing better in the second half. They kept competing."