GLENDALE, Ariz. (AP) San Francisco's game-manager turned into quite the game-changer in an impressive performance.

Jimmy Garoppolo threw for 317 yards and four touchdowns on a night his team's vaunted defense wasn't at its best, and the San Francisco 49ers reached the halfway point of their season undefeated, beating the Arizona Cardinals 28-25 on Thursday.

For a quarterback who often gets the backhanded compliment of being a good game-manager, Garoppolo's stellar performance provided some proof that the 27-year-old might be a little better than people think.

His teammates already knew.

''Yeah, he's pretty good,'' San Francisco 49ers tight end George Kittle said. ''I don't know why people don't think he is. He makes some pretty gutsy throws out there, doesn't he? Goodness gracious.''

San Francisco (8-0) fell behind 7-0 but responded with three touchdowns - one as time expired in the second quarter after Cardinals coach Kliff Kingsbury called a timeout and gave the 49ers a second chance on fourth down - to take a 21-7 halftime lead.

The 49ers were in control until about five minutes left in the fourth quarter, when Andy Isabella caught a short pass and sprinted for an 88-yard touchdown to help the Cardinals pull to 28-25.

But the 49ers were able to run out the clock on their ensuing offensive drive to end Arizona's comeback. Garoppolo had two crucial third-down completions to keep the final drive alive, including one to Emmanuel Sanders who caught seven passes for 112 yards and a touchdown.

Garoppolo completed 28 of 37 throws including touchdowns of 30, 7, 1 and 21 yards.

''Our team has done a good job of winning in different ways this year,'' Garoppolo said. ''Whether it's offense, special teams, defense or mixing and matching all of them. That's how you create a good football team. You're not relying on one part and everyone's playing tomorrow. Complimentary football.

''That's where we're at right now.''

Even in victory and at 8-0, Niners cornerback Richard Sherman was downright grumpy when asked about the defense. Arizona had 357 total yards.

''It's not about the results. The results are going to be what they are,'' Sherman said. ''Thank goodness our offense executed. But it's about the process, it's executing the way you're supposed to. It's about doing your job repeatedly, like with robotic consistency.''

Arizona (3-5-1) lost its second straight game. Rookie quarterback Kyler Murray threw for 241 yards and two touchdowns.

The Cardinals came into the game without their top two running backs, David Johnson and Chase Edmonds, who were battling injuries.

Kenyan Drake - who was acquired by the Cardinals on Monday in a trade with the Miami Dolphins - ran for 36 yards on the first play of the game and capped the opening drive with a 4-yard touchdown run. He finished with a team-high 110 yards rushing and 52 yards receiving.

''That's what we expected from him, why we traded for him,'' Kingsbury said. ''His skill set is perfect for what we do. He's explosive, he runs tough and to come and learn an entirely new offense, we didn't hold anything back. We knew we could call our best game.''

BAD TIMING

Arizona looked as if was about to escape the first half trailing 14-7 after San Francisco's Jeff Wilson Jr. was stopped on fourth down just shy of the goal line with a few seconds remaining in the first half.

But there was one major problem for the Cardinals: Kingsbury called a timeout just before the play began.

The 49ers converted on their second chance when Garoppolo hit Sanders for a 1-yard touchdown pass and a 21-7 lead. Kingsbury said he was trying to get a ''Kodak'' snapshot of what the 49ers were trying to do.

''Obviously looking back on it we would have rather gotten that stop,'' Kingsbury said. ''It just didn't work out for us this time.''

ROAD WARRIORS

San Francisco's off to an 8-0 start for the second time in franchise history. The Niners won 10 straight games to start the 1990 season.

This year's streak has included five road wins. The 49ers have three straight home games starting with the Seahawks on Nov. 11.

KITTLE SCARE

The 49ers got a scare early when star tight end George Kittle left the game after taking a helmet to the knee. But the third-year star quickly returned and responded with a 30-yard touchdown catch late in the first quarter to tie it at 7.

INJURIES

49ers: Defensive lineman Arik Armstead left in the first quarter with a throat injury but returned to the game. ... Linebacker Kwon Alexander had a chest injury in the second half and didn't return.

Cardinals: Defensive lineman Clinton McDonald left with what the team called a ''stinger'' in the third quarter.

UP NEXT

San Francisco returns home to face Seattle on Nov. 11 for a Monday night game.

Arizona travels to Tampa Bay on Nov. 10.

---

More AP NFL: https://apnews.com/NFL and https://twitter.com/AP-NFL

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.