GLENDALE, Ariz. -- The 49ers were playing to maintain their advantage in the race to be the No. 2 seed in the NFC playoffsThe Arizona Cardinals were trying to hold onto their faint playoff hopes.The Cardinals helped their cause with a 21-19 victory Sunday at University of Phoenix Stadium, and gave the 49ers their first true shot of adversity with three games remaining in the regular season.The 49ers (10-3) have the same record as the New Orleans Saints behind the unbeaten Green Bay Packers. But the 49ers still hold the advantage for the No. 2 seed in the NFC playoffs based on their better conference record. The Cardinals (6-7) remain alive in the NFC playoff hunt.It was a football fight out there, 49ers coach Jim Harbaugh said. I thought we were in position to win this football game really at times during the game. We didnt get it done and we are disappointed about that. We look forward to seeing how our teams responds to some adversity. We havent had a lot of it this year.--Cardinals starting quarterback Kevin Kolb was knocked from the game with a head injury in the first quarter, and backup John Skelton played the rest of the way. Three weeks ago, Skelton started against the 49ers and struggled immensely. He completed 6 of 19 passes for 99 yards and three interceptions before getting benched.Skelton got it going against the 49ers this time with a lot of help from Larry Fitzgerald, who caught seven passes for 149 yards, including a 46-yard touchdown. Skelton figured out the 49ers defense, as he completed 19 of 28 passes for 282 yards with three TDs and two interceptions.--Safety Donte Whitner said the 49ers secondary took full responsibility for the loss. But the 49ers offense was atrocious in the second half after Frank Gore had a 37-yard touchdown run on the teams first play of the third quarter.The 49ers only first down in their final six possessions came on a Cardinals personal foul penalty. The 49ers were 3 of 17 (18 percent) on third downs. Three times the 49ers got inside the Cardinals 10-yard line, and three times they settled for field goals.--The 49ers' pass defense got interceptions from safety Dashon Goldson and Tarell Brown, but they also gave up the big play. The Cardinals got on the board on Early Doucet's 60-yard TD reception in the second quarter.--The game's momentum swung on a three-play sequence in the second quarter. After a Kyle Williams 11-yard reception on third down left the 49ers short of the first down, the 49ers sent out their field-goal unit.The 49ers called for a fake field goal, instead of a 50-yard attempt. Holder Andy Lee hit center Jonathan Goodwin (who lines up as a wing on field-goal attempts) on a long pass and a possible touchdown.But Cardinals coach Ken Whisenhunt threw the challenge flag and referee Alberto Riveron ruled that the challenge was issued before the snap of the ball. Harbaugh said he was watching from the other sideline, and he disputed the ruling.Riveron went to view the Williams play to see if he got both feet in-bounds. But the replay machine malfunctioned, so the play was never reviewed.Kicker David Akers, who made four field goals in the game, then missed from 50 yards. And on the next play, Skelton hit Doucet for the touchdown.--Left tackle Joe Staley sustained a head injury in the first quarter and did not return. Alex Boone stepped in and played well. Staley must be cleared by an independent neurologist before he is allowed to return to practice.--Linebacker Patrick Willis (hamstring) missed his second career start. It is uncertain whether Willis will be available for the 49ers' next game, Monday, Dec. 19, against the Pittsburgh Steelers.