GLENDALE, Ariz. >> Even without their starting quarterback, the Arizona Cardinals are on top of the toughest division in football.
Backup Drew Stanton threw a pair of third-quarter touchdown passes to rookie John Brown and Arizona rallied to beat San Francisco 23-14 on Sunday, snapping a four-game losing streak to the 49ers.
Tommy Kelly blocked a field goal for the Cardinals (3-0), who outscored San Francisco 17-0 in the second half.
The 49ers (1-2) mounted 80-yard touchdown drives the first two times they had the ball, then didn’t score again, blowing a halftime lead for the second week in a row.
Stanton, starting for injured Carson Palmer for the second straight week, completed 18 of 33 for 244 yards and two scores. Michael Floyd caught five for 114 yards.
The 49ers’ Colin Kaepernick completed 29 of 37 for 245 yards and a touchdown and ran for another 54.
A week ago, San Francisco led 17-7 and lost at home to Chicago 28-20.
The 49ers were up 14-6 at the break this time before Stanton connected with Brown on touchdown passes of 24 and 21 yards.
Stanton quarterbacked the Cardinals to a 25-14 road win over the New York Giants a week ago, his first regular-season game since 2010. He was even sharper against San Francisco.
Arizona showed no sign of being distracted after backup running back Jonathan Dwyer was arrested on a domestic abuse charge earlier in the week. Dwyer has been placed on a non-football injury list and is gone for the season.
San Francisco was penalized nine times for 107 yards.
The 49ers were without tight end Vernon Davis (ankle injury) and his backup Vance McDonald (knee), as well as starting right tackle Anthony Davis (hamstring) and cornerback Tramaine Brock (toe).
Palmer remained sidelined with a nerve problem in his throwing shoulder.
A late-hit penalty on Dan Skuta, followed on the next play by a roughing-the-passer call against Patrick Willis, aided Arizona’s go-ahead touchdown drive in the third quarter.
On third-and-eight from the Cardinals 17, Stanton lofted a 45-yarder to Floyd for the drive’s big play. Stanton found Brown alone again from 21 yards out for the score.
Down 20-14, San Francisco drove to the Arizona 5 but an unnecessary roughness penalty against Anquan Boldin for head-butting the Cardinals’ Tony Jefferson pushed the 49ers back.
Then the 6-foot-6, 310-pound Kelly knocked down Dawson’s field goal try and the Cardinals’ Ed Stinson pounced on it near midfield.
Arizona looked to be driving for another score before Michael Wilhoite knocked the ball out of Larry Fitzgerald’s hands and Perrish Cox recovered for San Francisco at the Arizona 3 with 6:54 remaining.
But the 49ers couldn’t move it and Chandler Catanzaro’s third field goal of the afternoon, from 35 yards, sealed it in the waning seconds.
Kaepernick completed his first nine passes, seven on the initial scoring drive. His two-yard TD pass to Michael Crabtree put the 49ers up 7-3.
The Cardinals, aided by San Francisco penalties, used 8:08 to drive to the 49ers Francisco 13, but stalled there and Catanzaro’s 32-yarder cut it to 7-6.
The 49ers kept their next marathon drive going with a six-yard pass to Stevie Johnson on fourth-and-one from the Arizona 35. Carlos Hyde’s six-yard sweep made it 14-6 with 5:07 to play until halftime.
The Cardinals finally forced San Francisco to punt, with 28 seconds left in the half.