View full sizeAssociated PressHow much longer will the Cardinals consider John Skelton their backup?

GLENDALE, Ariz. -- John Skelton was awful against San Francisco a month ago. This time was a far different story.

Skelton stepped in for the injured Kevin Kolb and threw for 282 yards and three touchdowns, and the Arizona Cardinals rallied to hand the 49ers their third loss of the season, 21-19 on Sunday.

Larry Fitzgerald had seven catches for 149 yards, including a 46-yarder for a touchdown and a 53-yarder to set up the go-ahead score in the fifth win in the past six games for Arizona (6-7), which ended a five-game losing streak against the 49ers.

"That's Fitz being Fitz," Skelton said.

Kolb left after a blow to the head on Arizona's third play. Skelton, benched after throwing three interceptions in the Cardinals' 23-7 loss at San Francisco on Nov. 20, had a 60-yard touchdown pass to Early Doucet and a three-yard toss to Andre Roberts for what proved to be the winning score early in the fourth quarter.

Arizona sacked Alex Smith five times after getting five sacks against Dallas in its 19-13 overtime win last week. The 49ers (10-3) were at the Cardinals' 4-yard line twice and the 6 once in the second quarter and had to settle for short field goals by David Akers.

"We have to be honest with ourselves when we look at the film," Smith said. "It is not something we can just dismiss and move on."

Frank Gore rushed for 72 yards on 10 carries for the NFC West-champion 49ers (10-3), including a 37-yard run that put San Francisco ahead 19-7 early in the second half. He passed 1,000 yards rushing for the fifth time in his career, but didn't do much damage after that.

The 49ers were without standout inside linebacker Patrick Willis (hamstring), who sat out due to injury for the second time in his career.

On Arizona's possession following Gore's big run, Fitzgerald went over the middle and outjumped safety Dashon Goldson for the ball, then ran the remaining 20 yards for the score to cut the lead to 19-14 with 9:04 left in the third quarter.

On the play, Fitzgerald passed 1,000 yards for the season for the sixth time in his eight years in the NFL, including the past five.

On the first play of the fourth quarter, Fitzgerald took a pass over the middle and ran to the San Francisco 20 for a 53-yard gain. On third-and-2 from the 12, Skelton threw a screen to Doucet for a nine-yard gain to the 3. Skelton threw to Roberts on the next play, and the receiver crossed the goal line for the touchdown that gave the Cardinals their only lead.

Kolb, in his second start after missing four games with a right turf toe and bruise on the side of the same foot, was hurt when, with his team on its 17, he faded to pass and was hit by Justin Smith. It was one of two forced fumbles and two sacks for Smith.

San Francisco got the ball on its 43. An 11-play drive that managed 15 yards thanks to three sacks and two penalties led to Akers' 46-yard field goal that made it 3-0.

San Francisco pinned Arizona deep again, and Ted Ginn Jr.'s 52-yard punt return put the 49ers on the Cardinals' 4. But Arizona's defense held, and Akers' 22-yarder put the 49ers ahead 6-0 with 14:02 left in the half.

Then came the oddest moments of the game.

On third-and-7, Skelton scrambled for a first down but, on a hit by Smith, fumbled the ball and San Francisco recovered at its 47. The 49ers moved to the Arizona 40, where Akers lined up for a 50-yard field goal. But it was a fake, with holder Andy Lee tossing to backup center Jonathan Goodwin, lined up as a tight end, for the apparent score.

The whistle blew mid-play. Arizona was challenging the previous play, a pass from Alex Smith to Kyle Williams. But the replay system wasn't working, so the play had to be repeated.

This time, Akers' 50-yard attempt was wide right, his first miss from beyond 49 yards in seven tries this season.

The next play, Skelton threw over the middle to Doucet, and with the help of a vicious block from Fitzgerald, Doucet raced 60 yards for the score. Arizona led 7-6 with 7:10 left in the half.

The 49ers responded with a 10-play, 69-yard drive, but again stalled deep in Arizona territory. On second-and-4 at the 6, Smith's pass was deflected by Arizona rookie Sam Acho. Then, the San Francisco quarterback tried a sweep left and was tackled for a three-yard loss. Akers' 27-yard field goal put the 49ers back on top 9-7 with 1:58 to play.

Late in the half, the 49ers intercepted a pass when Donte Whitner slammed into Roberts just as the ball arrived. Goldson intercepted and returned it 17 yards to the Arizona 16. Akers' 22-yard field goal as the half ended put San Francisco up 12-7.

"I thought we were in position to win this football game really at all times during the game," coach Jim Harbaugh said. "We didn't get it done and we are disappointed about that. We look forward to seeing how our team responds to some adversity. We haven't had a lot of it this year."