GLENDALE, Ariz. (AP) — Andy Isabella caught Kyler Murray's pass behind the outstretched hand of a defender and left the rest of San Francisco's defense flailing behind him.
A two-point conversion later, Arizona had pulled within three after trailing all night.
Needing a defensive stop, the Cardinals had no answer for Jimmy Garoppolo and the 49ers.
Arizona's upset bid came up short. San Francisco's undefeated season remained intact.
Garoppolo threw four touchdown passes and led the 49ers on a clock-winding final drive, helping the 49ers hold off the Cardinals 28-25 Thursday night.
"We just need to figure out who we are as a defense," Cardinals safety Budda Baker said.
The Cardinals (3-5-1) marched for a touchdown on the game's opening drive, fell flat the rest of the half and rallied against one of the NFL's two remaining undefeated teams.
Kenyan Drake had a strong first impression with David Johnson and Chase Edmonds out, accounting for 162 total yards and a touchdown despite having just three days preparation.
"They got me for a reason, to come out here and make plays," said Drake, who was traded from the Dolphins on Monday.
Kyler Murray overcame an unproductive first half — not to mention a near pick-six — by guiding the Cardinals on three second-half scoring drives. He hit KeeSean Johnson on a 9-yard TD pass , put the TD pass to Isabella just out of the defender's reach and hit Drake on the 2-point conversion.
Murray threw for 241 yards and a pair of TDs.
Arizona's defense led to its demise.
A season-long struggle to stop tight ends resurfaced when George Kittle caught a slant, bulldozed Baker and scored a 30-yard touchdown . It was the ninth touchdown by a tight end against Arizona this year.
"Those big guys, you hit them high and don't wrap up, he's going to run over you," Baker said. "On that slant, I was kind of off-balance and didn't wrap up and look what happened."
Garoppolo hit Kendrick Bourne on a 7-yard score and got a second chance on fourth-and-inches when coach Kliff Kingsbury called timeout just before the Cardinals stopped the 49ers. Garoppolo found Emanuel Sanders on a 1-yard TD to give San Francisco a 21-7 halftime lead.
"I wanted to get a Kodak timeout, get one of those looks and have them hopefully run their best play," Kingsbury said. "They ran a play and it worked for us initially, but obviously looking back on it was would have rather gotten that stop. It just didn't work out for us this time."
The Cardinals had a hard time getting much pressure on Garoppolo and allowed the Niners (8-0) to repeatedly convert on third downs. San Francisco finished 11 for 17 on third down.
Patrick Peterson also had one of his worst games as a pro in his second game back from a six-game suspension for performance enhancers. The All-Pro cornerback was repeatedly beat by Niners receivers, including a 21-yard touchdown pass from Garoppolo to Dante Pettis in the third quarter.
"He's still getting back into game shape and understanding our scheme," Kingsbury said. "First time he's ever played in this scheme full speed and live-game reps. He's a very good football player."
Despite their struggles, the Cardinals still had a final chance after Isabella's 88-yard touchdown catch .
They never got the ball back.
San Francisco converted three third downs — one confirmed on review — and ground out the final 4:53 to remain undefeated.
Good news for the Cardinals: They get another shot at San Francisco in two weeks.
More AP NFL: https://apnews.com/NFL and https://twitter.com/AP_NFL