TEMPE, Ariz.(AP) Backup Brock Osweiler threw for 380 yards and hit Aaron Pflugrad on two of his four touchdown passes, helping Arizona State keep its slim bowl hopes alive with a 55-34 victory over UCLA on Friday.

Arizona State (5-6, 3-5 Pac-10) lost starting quarterback Steven Threet to a head injury early and trailed 17-0 late in the first quarter. Osweiler rallied the Sun Devils with three TD passes in the first half, and Arizona State pulled away in the second on a 71-yard touchdown run by Cameron Marshall and Jamal Miles' 99-yard kickoff return.

Marshall ran for 147 yards and Arizona State had big goal-line stand in the third quarter.

UCLA (4-7, 2-6) rolled up 148 yards in the first quarter, but saw its bowl hopes fizzle as the Sun Devils piled up most of its 595 total yards after the game's first 12 minutes.

Bruins quarterback Richard Brehaut, back from last week's concussion, threw for 311 yards and three touchdowns and ran for another score.

This was essentially a playoff game between two losing teams; both needed to win their final two games to become bowl eligible.

Well, UCLA did.

Arizona State needed to beat UCLA, must beat Arizona in next week's rivalry game, then get some help.

Because the Sun Devils have two wins over FCS schools, they needed to reach seven wins - already off the table - or get to six, hope not enough teams are bowl eligible and get a waiver from the NCAA.

Early on, it looked like they had no chance.

UCLA raced 79 yards on its first drive, capped by Brehaut's 12-yard TD scamper on an option right. Dalton Hilliard's blocked punt set up a 40-yard field goal by Kai Forbath, and Brehaut made it 17-0 with a 46-yard touchdown pass to Randall Carroll.

The few fans who showed up booed, but Arizona State finally snapped to life behind Osweiler.

The junior, who got some first-team reps in practice the past two weeks, came in when Threet wobbled off with a head injury on a sack by Sean Westgate on the Sun Devils' ninth play.

Osweiler got Arizona State's stagnant offense going quickly, hitting Pflugrad on a 5-yard toe-tapper TD in the corner of the end zone late in the first quarter. Mike Willie then turned a slant into a 32-yard touchdown by breaking two initial tackles, and Osweiler connected on his third TD pass of the half - he had two in his career before Friday - on another sideline route, this one a 7-yard hookup with Gerell Robinson that put the Sun Devils up 21-17.

Forbath tied John Lee's school record with his 85th career field goal, a second-chance 37-yarder at the halftime horn after Arizona State was called for a penalty on his missed 52-yard attempt.

That was it for the Bruins, though.

Thomas Weber hit a field goal after Osweiler hit T. J. Simpson on a 76-yard pass to open the second half, and Marshall made it 31-20 on his TD run, two plays after Arizona State stuffed Johnathan Franklin on fourth-and-goal at the 1.

UCLA tried to fight back, marching for a 21-yard TD pass from Brehaut to Nelson Rosario, but Miles took the ensuing kickoff in for a touchdown to put the Sun Devils up 38-27.

Osweiler sealed it early in the fourth quarter, hitting Pflugrad on a 15-yard touchdown in the back of the end zone and added a late, 15-yard touchdown run.