SAN DIEGO -- Sean Mannion threw three touchdowns and Oregon State scored three times in the fourth quarter to come from behind and defeat San Diego State 34-30 on Saturday night.

After Mannion hit Terron Ward for a 10-yard score to pull Oregon State within 30-28, cornerback Steven Nelson intercepted Quinn Kaehler's pass and returned it 16 yards to give the Beavers the lead with 2:38 remaining in the game.

Kaehler, who was making his first career start, was intercepted again on the next possession by Ryan Murphy to seal the win for the Beavers. It's their second win in five games against the Aztecs.

Mannion completed 38 of 55 attempts for 367 yards, and the Oregon State rushing game was held to just 2 yards. Ward ran 10 times for 25 yards, but Mannion lost 23 yards on four attempts.

Kaehler completed 16 of 24 passes for 251 yards and two touchdowns after taking over the starting job when Adam Dingwell injured his back last week against Ohio State. Adam Muema rushed a career-high 28 times for 71 yards and a touchdown.

San Diego State jumped out to an early lead by scoring on the opening possession of the game. Kaehler hit Donnel Pumphrey on a 23-yard pass to put the Aztecs on top 7-0 with 11:44 remaining in the first quarter.

Oregon State answered with a 1-yard run from Ward to even the score at 7-7 and widened the lead to 14-7 on a 2-yard pass from Mannion to tight end Kellen Clute.

The Aztecs tied the score on the ensuing possession when Kaehler threw an 80-yard touchdown to Colin Lockett on the first play of the drive. They took a 27-14 lead after Wes Feer added a pair of field goals, including a career-long 45-yarder, and Muelma scored on a 4-yard run.

Beavers head coach Mike Riley made his return to Qualcomm Stadium after having coached the San Diego Chargers from 1999-2001. He finished with a 14-34 record as head coach in San Diego.