GLENDALE, Arizona _ Another blown lead cost Kyle Shanahan another shot at his first win as 49ers coach.
Amid a flurry of field goals, the 49ers owned a 15-12 lead late in overtime before the host Arizona Cardinals won 18-15 on a 19-yard touchdown catch by Larry Fitzgerald.
Robbie Gould's fifth field goal had put the 49ers in position to win it, but his 23-yarder came with 2:24 remaining in overtime, and that was enough time for the Cardinals (2-2) to rally.
Rather than settle for a tying field goal _ as they had four times earlier in the game _ the Cardinals went for the win, and they got it when Carson Palmer found Fitzgerald dart toward the goal post against Rashard Robinson's coverage with 32 seconds remaining.
The 49ers (0-4) have lost by 20, 3, 2 and now 3 points under Shanahan, including a 12-9 loss at Seattle two weeks ago in which they led 9-6 midway through the fourth quarter.
Back-to-back road games are next for the 49ers, at Indianapolis and Washington.
This would have been the 49ers' first win since Colin Kaepernick led a Christmas Eve comeback under then-coach Chip Kelly over the host Los Angeles Rams last season.
The Cardinals (2-2) had only five days of rest after losing Monday night's home opener to the Dallas Cowboys, whereas the 49ers last played 10 days earlier in a 41-39 loss to the Rams.
The 49ers lost 23-20 on a field goal as time expired in last season's trip to Arizona.