STANFORD, Calif. -- Ty Montgomery had several drops and one of his worst games in a loss at Washington last season. A year later, he turned in a breakout performance that saved Stanford.

Montgomery finished with 290 all-purpose yards and two touchdowns, and the fifth-ranked Cardinal held on to beat No. 15 Washington 31-28 on Saturday night in a matchup of unbeaten Pac-12 North teams.

"I would say Ty was the difference in the ballgame," Stanford coach David Shaw.

The Huskies outgained Stanford 489-284 in total yards but had no answer for the Cardinal's rejuvenated junior wide receiver any time he touched the ball.

Montgomery returned the opening kickoff 99 yards for a TD and caught a 34-yard pass for another score to put the Cardinal (5-0, 3-0) in control from the start and keep them there. He caught three passes for 56 yards, ran 30 yards on two carries and racked up 204 yards returning kicks.

"It showed that we can stand in there and we can finish a game and we're willing to fight if we have to," said Montgomery, who was slowed -- and sometimes sidelined -- by a nagging knee injury last season.

Stanford led from wire-to-wire while winning its 13th straight game and 12th in a row at home. No matter the score, Washington never went away.

Keith Price threw for 350 yards and two touchdowns on an injured thumb and nearly led the Huskies (4-1, 1-1) back. But officials overturned Price's completed pass on fourth down in the final minutes to end Washington's rally.

Price completed 33 of 48 passes with one interception, and Bishop Sankey ran for 125 yards and two scores in an impressive -- though, at times, mistake-filled -- performance for the Huskies against the defending Pac-12 and Rose Bowl champions.

In the end, officials ruled Washington came up at least one bounce short.

On fourth-and-10 from the Stanford 49, Price rolled to his right and stiff-armed a defender before throwing a 16-yard pass near the sideline to a diving Kevin Smith. But after reviewing TV replays, officials said the ball hit the ground.

"It's unfortunate the game had to come down to a judgment call like that," Huskies coach Steve Sarkisian said. "That part was unfortunate because it was two good football teams battling and competing with one another and I wish the game would have got won on the field and not in the booth upstairs with some guy that didn't get to feel the emotion in the hard-fought football game that game was."

The Huskies haven't started 5-0 since 1992 and need to regroup fast to avoid a second straight loss with No. 2 Oregon coming to Seattle next week.

The Cardinal sacked Price five times, tallied 11 tackles for loss and forced the Huskies into some big-time blunders. Washington committed 10 penalties for 89 yards.

Stanford overcame some sloppy offense of its own but still looked nothing like the team that was handed its only conference loss by Washington in a 17-13 setback in Seattle last season. This time, the Cardinal offense -- led by Kevin Hogan, who improved to 10-0 as the starter -- did just enough, and a do-it-all showing from Montgomery made the difference.

Hogan completed 12 of 20 passes for 100 yards and a touchdown with one interception. Tyler Gaffney ran for 72 yards and another score.

But Montgomery stole the spotlight for Stanford, starting when he sprinted up the middle untouched to return the opening kickoff for his second career return for a score. It also was the first on an opening kickoff for Stanford since Chris Owusu in 2009 against Washington.

After Sankey's short TD run capped Washington's impressive 88-yard drive late in the second quarter, Montgomery seized the momentum for Stanford again. He caught a 39-yard TD pass from Hogan down the sideline to give the Cardinal a 17-7 lead with 11 seconds remaining before halftime.

The teams twice traded scores to start the third quarter with an outpouring of offense more typical of the Washington-Stanford days of old.

After Washington's second straight touchdown drive, the Cardinal turned to Montgomery once more. He juked a pair of defenders during a 68-yard kickoff return to the Washington 19 that set up Gaffney's TD run and put Stanford up 31-21.

Washington's best chance to come back ended when Trent Murphy tipped Price's pass near the goal line and A.J. Tarpley grabbed the interception and ran 15 yards to the Stanford 20 with 6:11 remaining.

But the Huskies came back again with Price throwing a 1-yard TD pass to Jaydon Mickens with 2:38 to play. Washington stopped Stanford three-and-out to get the ball back on its own 33 with 1:51 remaining, but the Cardinal made one final stop -- just as it did in so many close games last season.

"We are a tough, mentally tough team, which of all the things you can ask for as a coach, that's what you want," Shaw said. "You want guys that don't blink."