SANTA CLARA, Calif. (AP)The San Francisco playmaker-filled offense lived up to the billing, the defense looked dominant and the 49ers delivered a message that they should be considered a legitimate Super Bowl contender in the NFC.

The Niners went to Mexico City and put together their most complete performance of the season, with Jimmy Garoppolo throwing four touchdown passes in a 38-10 victory over the Arizona Cardinals on Monday night for their third straight win.

”I feel like we are playing better football each week and that is the goal,” coach Kyle Shanahan said. ”You want to get better as the season goes. I feel like we are doing that right now.”

San Francisco (6-4) has bounced back from a humbling loss to Kansas City with victories over the Rams, Chargers and Cardinals to move into a tie for first with Seattle in the NFC West.

The latest win also helped Shanahan improve to 49-48 in his coaching career, including the playoffs, giving him a winning record for the first time since taking over in San Francisco in 2017.

Shanahan failed on six previous tries but has finally climbed out of the hole created by an 0-9 start to his tenure and looks as if he has a team capable of playing as well as the 2019 version that made it to the Super Bowl.

”We are definitely ready to go on a run,” tight end George Kittle said. ”We have just won three straight. Our defense is playing at an incredibly high level not giving up points in the second half for multiple games in a row. Our offense, we scored when we got in the red zone. That was big for us.”

San Francisco scored five touchdowns from scrimmage, while allowing no sacks and not turning the ball over as the offense looks to be hitting its stride with the midseason addition of Christian McCaffrey.

McCaffrey gained 106 yards from scrimmage, Kittle and Brandon Aiyuk had two TD catches and Deebo Samuel scored on a 39-yard run.

”I think that the past couple weeks we’ve been putting together some good games,” Garoppolo said. ”Today was probably our best full game that we put together. But we got a long way to go.”

WHAT’S WORKING

Second-half defense. San Francisco pitched a second-half shutout for the third straight game. This is the second time it has done that in the past 30 years with the other coming in 2019 when the Niners went to the Super Bowl. In the three wins against the Rams, Chargers and Cardinals, the defense has allowed no points, 242 yards and 3.1 yards per play after halftime.

WHAT NEEDS WORK

Not much went wrong Monday night so the only thing the Niners need now is to keep replicating that formula over the final seven games of the regular season.

STOCK UP

Garoppolo has thrown six TD passes with no interceptions the past three games, marking the first time in his career that he has had three straight starts in a season without an INT. He had his fourth career game with four TD passes with three of them coming against the Cardinals. He did it twice against Arizona in 2019 and also against New Orleans that season.

STOCK DOWN

Third-round picks. San Francisco’s two third-rounders have provided almost no production all season. Running back Ty Davis-Price was inactive for the third straight game. He has two carries and 14 offensive snaps since Week 2. Receiver Danny Gray has played in six games this season, but still hasn’t caught a pass on his six targets.

INJURIES

San Francisco reported no injuries from the game for a third straight contest. The Niners are still hoping to get DT Arik Armstead (foot, ankle) and DE Samson Ebukam (Achilles, quadriceps) back from injuries soon.

KEY NUMBERS

15. The 49ers have won each of their first four games in the division by at least 15 points, becoming the first team to do that since the 2007 Patriots. The previous time San Francisco started 4-0 in the NFC West was in 2002.

WHAT’S NEXT

Host New Orleans on Sunday to start a three-game homestand.

AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL