PROVO, Utah -- Never mind if Cody Vaz hadn't taken a snap since 2010, or started a game since he was in high school.

The Oregon State backup-turned-starter made it look easy in Saturday's 42-24 win over Brigham Young, passing for three touchdowns and 332 yards against a defense rated fifth in the nation.

What impressed teammates most wasn't his 59-yard completion to Brandin Cooks, or 29-yarder to tight end Connor Hamlett.

It was the block he made on a BYU defensive lineman that paved the way for Markus Wheaton to score on a 12-yard fourth-quarter reverse that bumped No. 10 Oregon State's lead to 11 points with 5:30 remaining.

"I loved that," said Wheaton, who also caught a pair of first-quarter TD passes from Vaz. "He got me into the end zone and put six points on the board for us. He's not scared to do stuff like that for us. That's why he's a great quarterback."

Until a week ago, Vaz was the unheralded backup to sophomore sensation Sean Mannion.

Then Mannion injured his left knee, thrusting the 6-1, 198-pound junior into the lineup, on the road, against a "blackout" crowd and a BYU team donning black uniforms for the first time in the modern era.

"I knew all along that Cody is a pretty good player, but I also knew this is a pretty hard venue to step into," Oregon State coach Mike Riley said. "I thought guys helped him out and made plays."

Vaz came out firing, completing his first five passes for 75 yards, capped by a 11-yard TD pass to Wheaton. He tossed a 24-yard scoring strike to Wheaton with 3:01 left in the quarter for a 14-7 Oregon State lead.

By the end of the first quarter Vaz was 8 of 10 for 153 yards with two TDs and a passer rating of 274.5.

"We have so many playmakers and I just have to get the ball into their hands," said Vaz, who completed 20 of 32 passes. "I knew I was capable of playing that way and I knew I had to come out and calm this place down, because it was a little rowdy. But this was a team effort."

Oregon State is 5-0 for the first time since 1939, while BYU fell to 4-3, and now must take on another top-10 team in Notre Dame on the road.

While Mannion is out indefinitely, Vaz still has the surrounding cast, and Saturday they came up big.

Cooks caught eight passes for 173 yards for the Beavers.

"Cody was just great at putting the ball where I could make the play and I couldn't let Cody down," said Cooks.

The Beavers also got some help on the ground, gaining 118 yards -double what BYU had been allowing.

Storm Woods and Malcolm Agnew led the way, with Woods scoring on a 16-yard third-quarter run for a 21-14 lead.

Vaz's third TD pass was pure luck as BYU linebacker Kyle Van Noy tipped it at the line. Tight end Colby Prince grabbed it in the end zone for a touchdown while surrounded by three defenders.

It gave Oregon State a 28-21 lead with 14:48 remaining.

"It was just kind of a bang-bang thing and luckily it fell into Colby's hands," Vaz said. "It was kind of scary seeing that ball float in the air, but luckily we came up with it."

A 35-yard field goal by Justin Sorensen pulled BYU within 28-24 with 8:55 left.

That's as close as the Cougars would get.

"We believe we had a great chance to compete and win this game," BYU coach Bronco Mendenhall said. "We didn't play well enough to do it."

While Vaz was making his first collegiate start, BYU counterpart Riley Nelson was seeking to quiet his own critics.

Nelson, who had missed the previous two games with what he said were "back fractures," countered Oregon State's first score with a 10-play, 75-yard drive of his own. He showed he was healthy from the start, bootlegging left on BYU's first play from scrimmage and rumbling 16 yards.

He also directed a 12-play, 30-yard TD drive that saw the Cougars convert three fourth-down plays. The last one was a 2-yard TD pass to tight end Devin Mahina on fourth-and-goal to tie the score at 14 with 3:25 left in the half.

The score was tied at 21 after Jamaal Williams' 2-yard run late in the third quarter.

The Beavers outscored BYU 21-3 the rest of the way, rolling up 450 yards offense against a team that had held its previous 12 opponents under 300 yards.

Nelson completed 28 of 51 passes for 305 yards and a touchdown, but was intercepted three times and sacked four times.

"I think I was trying to protect myself and to not run as much," Nelson said.

He gave Oregon State' defense credit.

"We couldn't take the top off of them today," he said. "We got a few chunks on some play-actions, but we really couldn't get the ball vertically."

Vaz, and his talented slew of receivers, had no problems with that.

Vaz's final scoring drive covered 77 yards and was aided by back-to-back pass interference calls that moved the ball to the Cougars' 12. Wheaton took it the rest of the way, then Jordan Poyer's 1th career interception -- one he returned 49 yards for a touchdown, sealed the win.

"I got real lucky with that," Poyer said. "The ball just happened to bounce right into my hands and I was able to take it to the house."

Mendenhall, who was on the field as a safety for Oregon State the last time the Beavers won in Provo, in 1986, said it wasn't meant to be this time.

"It was one of those days when the bounces didn't go our way," Mendenhall said. "They made more plays to win."