Michigan State didn't underestimate Oregon quarterback Marcus Mariota. He just confounded them anyway.

Mariota threw for 318 yards and three touchdowns and the No. 3 Ducks defeated the No. 7 Spartans on Saturday in what was billed as the biggest nonconference game of the season.

"They were who they were and saw what you expected to see," Michigan State coach Mark Dantonio said. "You saw a quarterback making plays and a quarterback that's dynamic. When he had to put it on the money he did and he had zero turnovers."

Mariota completed 17 of 28 passes with no interceptions, although Michigan State's defense was able to sack him three times. Ultimately, he led the Ducks to four unanswered touchdowns in the second half for the win.

"They guy understands defense, he understands offense," said senior free safety Kurtis Drummond. "Marcus had a good game today."

The loss snapped an 11-game winning streak for the defending Big Ten and Rose Bowl champion Spartans, who went 13-1 last season.

Mariota's Michigan State counterpart Connor Cook had a solid game in the loss, throwing for 343 yards and a pair of touchdowns. But he was also sacked three times and threw three picks.

"We just didn't make plays, plays that were there that we didn't make, throws that were there that I didn't make. Really, that was it," Cook said.

The Spartans had the second-ranked total defense in the nation last year, allowing opponents an average of just over 252 yards per game. But the high-flying Oregon offense — combined with temperatures approaching 100 degrees — appeared to wear on Michigan State as the game went on.

The two teams both went three-and-out on their opening series and it appeared at first that defenses would rule the day. The Spartans broached Oregon territory midway through the quarter, but on third-and-10 on the 38, Erick Dargan intercepted Cook and ran it back 36 yards.

The Ducks capped the drive when Thomas Tyner barreled over the goal line for a 1-yard touchdown, and Oregon added the conversion for an 8-0 lead. Matt Wogan extended it with a 28-yard field goal.

Michigan State answered with an impressive drive topped by Jeremy Langford's 16-yard scoring dash. Langford finished with 24 carries for 86 yards.

Mariota hit Devon Allen with a 70-yard touchdown pass to give the Ducks an 18-7 lead with 10:12 to go in the half. The scoring pushed Mariota past Darron Thomas (66) on Oregon's all-time list. Mariota has thrown at least one touchdown in each of the 28 games he's played at Oregon.

Michael Geiger kicked a 34-yard field goal and Cook added a 7-yard touchdown pass to Tony Lippett with 2:26 left before the break to pull the Spartans within a point. Michigan State took a 24-18 lead with 18 seconds to go when Josiah Price leaped to grab Cook's 7-yard TD pass into the end zone.

The Spartans padded the lead to start the second half with Geiger's 42-year-old field goal, but Mariota found Allen with another touchdown pass, this time from 24 yards out, to cut the Spartans' lead to 27-25.

Oregon regained the lead on Mariota's 37-yard scoring pass to Keanon Lowe before Freeman's 38-yard TD run.

With the Spartans threatening on Oregon's 31 midway through the fourth quarter, Ifo Ekpre-Olomu intercepted a pass intended for receiver AJ Troup. Freeman added a 14-yard touchdown run for the final margin.

"I thought Cook was impressive, but in the second half, I don't know whether it was the pass rush, or it was the coverage, but the ball didn't get down the field as consistently," Dantonio said.

The Spartans' 11-game winning streak included a 34-24 victory over Ohio State in the Big Ten championship and a 24-20 victory over Stanford in the Rose Bowl.

The Ducks were the highest-ranked nonconference opponent the Spartans had faced since they played top-ranked Nebraska in 1996.

It was the first time that two teams ranked in the top 10 had met in a nonconference tilt at Autzen Stadium. The then-No. 4 Ducks defeated then-No. 9 Stanford 52-31 in conference play in 2010.

The two teams had met four times before, with each team winning at home to make it 2-2. Michigan State rallied to win 27-20 in East Lansing for the last meeting in 1999.

Afterward Cook was trying to look at the bright side.

"Coming out to Oregon was a great experience," he said. How many people can say they played in a stadium like this against a great opponent in Oregon?"