EUGENE, Ore. (AP) — Stanford quarterback Keller Chryst finally found a groove for his third start.

The junior quarterback, who took over for Ryan Burns at the end of last month, threw for 258 yards and three touchdowns in Stanford's 52-27 victory over Oregon on Saturday.

"You saw Keller just finally get comfortable," Stanford coach David Shaw said. "He got comfortable, the ball was coming out of his hands on time, and he hit some big-time throws."

Stanford (7-3, 5-3 Pac-12) is 3-0 now with Chryst at quarterback. His breakout — along with Christian McCaffrey's big day — provided some offensive equilibrium for the Cardinal, Shaw said. McCaffrey ran for 135 yards and three touchdowns.

"We talked at length about balancing out the offense. The first two weeks with Keller as the starter we knew he was trying to get comfortable so we wanted to really dedicate ourselves to running the football," Shaw said. "This game we wanted to be more balanced."

The loss means that Oregon (3-7, 1-6) will finish with a losing record for the first time since 2004. It also effectively knocked the Ducks out of contention for a bowl game with two games left.

"We just got outplayed," offensive lineman Cameron Hunt said.

The game did not carry the implications that many thought it might have at the start of the season. Neither team was ranked for the first time since the 2008 meeting.

Either Stanford or Oregon had won every Pac-12 championship since the league expanded and a title game was established in 2011. This season, Washington and Washington State are undefeated in conference play at sit atop the league's North division.

McCaffrey ran for a 61-yard touchdown to put Stanford up early. After Oregon lost the ball on a fumble, McCaffrey scored again on a 5-yard TD run. Last season's Heisman runner-up needed just 20 yards rushing going into the game to reach the 1,000-yard mark for the second straight season.

"I was patient, patient and then when I saw the hole, there was a lot of green grass ahead of me," McCaffrey said about his long opening touchdown run.

McCaffrey, who also scored on a 14-yard run in the first half, had struggled this season and sat out of the game against Notre Dame because of an injury. But he looked to regain his form last weekend with 199 yards rushing in a 26-15 victory over Oregon State.

McCaffrey also caught five passes for 52 yards against Oregon.

Oregon freshman quarterback Justin Herbert, who started his fifth game after taking over for graduate transfer Dakota Prukop, threw for 272 yards and two touchdowns. But he also threw two interceptions.

Royce Freeman ran for 111 yards and a touchdown for Oregon. The Ducks' main problems were on defense, allowing Stanford 540 yards of total offense. It was the first time this season the Cardinal had 250 or more yards both via pass and on the ground this season.

Kani Benoit's 7-yard touchdown run for Oregon in the final quarter made it 52-20 and allowed the Ducks to preserve their streak of games with 20 or more points to 40, the longest active streak in the nation.

Asked what he would like to see from his players in the final two games, Oregon coach Mark Helfrich said: "Find out who rises up. Find out what we're made of. Obviously, you play to win every single game, every single rep, whatever you are doing, if you are a competitor."

THE TAKEAWAY

Stanford: The Cardinal averaged just 20 points a game this season before Saturday's win. ... Linebacker Joey Alfieri, an Oregon native, intercepted a first-half Herbert pass to Tony Brooks-James, for his first career interception.

Oregon: Oregon fell behind 21-0 in the first half for the third time in the last five games. ... The Ducks have lost seven of their last eight games. ... "I apologize to them for how we finished out the home slate," Helfrich said in a message to fans following the game.

INJURIES: The Ducks were again without receiver Dwayne Stanford, who has missed five games. CSNNW.com reported before the game that Stanford was out for the rest of the season. ... Senior safety Reggie Daniels was listed on the depth chart but also in street clothes. ... Following the game Helfrich said that running back Taj Griffin was out for the season because of a non-contact injury he sustained in practice this week. ... Senior receiver Pharaoh Brown left the game with what appeared to be a hamstring injury.

On Stanford's side, wide receiver Francis Owuso and safety Zach Hoffpauir did not play because of injuries. ... Defensive end Solomon Thomas appeared to injure his ankle in the first half. Shaw said afterward he was cleared to go back in the game but didn't because of the score.

QUOTABLE: "He's the tone setter. He's the guy that we have that the other teams don't have. And if we give him an opportunity to make plays, he never disappoints," Shaw said of McCaffrey.

UP NEXT

Stanford: The Cardinal visit California for the Big Game before finishing the season at home against Rice.

Oregon: The Ducks visit Utah next Saturday before finishing up with rival Oregon State to the north in Corvallis.