STANFORD, Calif. -- Stanford squashed Oregon's national championship hopes again, schooling the Ducks in power football. Florida State might want to send the Cardinal a thank you card.

Tyler Gaffney ran for 157 yards, and No. 5 Stanford hammered No. 3 Oregon for three quarters before holding off a furious rally by the fast-paced Ducks for a 26-20 victory Thursday night.

The Cardinal made it two in a row against the Ducks, who haven't lost to any other team in the past two seasons.

"If you control the line of scrimmage on either side of the ball, you can beat these guys," Stanford coach David Shaw said. "We're a big, physical football team that plays well together."

Kevin Hogan ran for a touchdown and played a mistake-free game at quarterback for Stanford (8-1, 6-1 Pac-12) as the Cardinal put on a clinic in how to play keep-away from a team that was averaging 55.6 points per game. Stanford ran 66 times for 274 yards -- sometimes behind as many as nine offensive linemen -- and held the ball for 42 1/2 minutes.

Heisman Trophy contender Marcus Mariota, who said he was playing on a left knee that was a "little banged up," was inaccurate and under pressure much of the night. He finished 20-of-34 for 250 yards with a fumble but threw two fourth-quarter touchdown passes, sandwiched around a blocked field goal return for a score by Rodney Hardrick, to pull the Ducks (8-1, 5-1) to 26-20 with 2:12 left.

Oregon recovered one onside kick but couldn't do it twice, and Stanford ran out the clock.

"We don't hold the cards anymore," first-year Ducks coach Mark Helfrich said.

Those belong to No. 2 Florida State now. The Seminoles don't have to worry about the Ducks nudging them out of second place in the BCS standings behind Alabama.

FSU was in danger of slipping to third in the BCS if Oregon could have registered a big road victory against a quality opponent. Now, the Seminoles face a manageable remaining schedule with a good chance to win their way to the BCS championship game at the Rose Bowl in January.

Unbeaten Baylor and Ohio State have to be happy, too, with one fewer hurdle to clear.

As for Stanford, it gets first place in the Pac-12 North and the inside track to another league title game and Rose Bowl. And maybe, if things get really weird, the Cardinal can get back in the national title hunt.

Stanford won a three-point game in overtime at Oregon last season to deny the Ducks a chance to play for the national championship, but it didn't look as if there would be much drama in the return bout on the Farm. Stanford led 17-0 at halftime and added three more field goals by Jordan Williamson in the second half.

Stanford put an end to Oregon's national championship hopes for the second season in a row. Ezra Shaw/Getty Images

Oregon looked out of it, down 26-0 early in the fourth with Stanford hammering away behind Gaffney, who set a school record with 45 carries.

"I feel like I just played a football game," Gaffney said with a smile.

Even after Oregon finally broke through with a 23-yard touchdown pass from Mariota to Daryle Hawkins, the Cardinal went on another time-consuming drive and attempted a long field goal that would have sealed it.

Instead, the Ducks blocked it, Hardrick scooped and scored from 65 yards out with 5:08 left, and suddenly it was interesting.

Only five seconds later, it got even more interesting when the Ducks recovered an onside kick. They quickly moved inside the Stanford 5 but got pushed back to fourth-and-goal from the 12. Mariota threw a touchdown pass to Pharaoh Brown with 2:12 remaining, but the time it took the Ducks to get in while burning a timeout was key.

Stanford grabbed the next onside kick, and Oregon was powerless to stop the clock.

Stanford put Oregon in a 14-0 hole, the Ducks' largest deficit of the season to that point, with a power football clinic that started when the Cardinal came up with a fourth-and-goal stop from the 4 in the first quarter.

Stanford followed with a punishing 96-yard drive that included one long strike from Hogan to Michael Rector. Gaffney's 2-yard plunge made it 7-0.

With a little help from a pass interference call that wiped out an Oregon interception, Stanford made it 14-0 on Hogan's option keeper from 11 yards out with 11:26 left in the second quarter.