Christian McCaffrey scored three touchdowns, Charvarius Ward had two interceptions — including a pick-6 — and the San Francisco 49ers clinched the NFC West title by pushing their winning streak to six games with a 45-29 win over the Arizona Cardinals on Sunday.

San Francisco's Brock Purdy — making his first NFL start at State Farm Stadium, which is about 45 miles from where he grew up — completed 16 of 25 passes for 242 yards and tied a career high with four touchdowns. He also shook off a hard hit in the second quarter that caused him to miss a few plays.

During their winning streak, the 49ers (11-3) have won all of their games by at least 12 points. They've also won 12 straight against divisional opponents in the NFC West. San Francisco has won back-to-back division titles for the first time since the 2011-12 seasons.

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

McCaffrey scored his second touchdown early in the third quarter, sneaking out of the backfield for a 41-yard score and a 28-13 lead. The running back was so wide open that he leaped for the catch, fell down, and still had enough time to get to his feet and sprint to the end zone.

He made it there a third time later in the third quarter after plowing ahead 1-yard for the touchdown and a 35-16 advantage. Deebo Samuel followed with his second touchdown catch in the fourth, a 19-yard reception that made it 42-22.

The 27-year-old McCaffrey finished with five catches for 72 yards and two touchdowns while also running for 115 yards and a score.

Ward put the 49ers ahead for good when he stepped in front of Trey McBride to grab Kyler Murray's pass after the Cardinals (3-11) decided to go for it on fourth-and-3. The cornerback ran 66 yards the other way for a 14-7 lead, pulling away from a pair of Arizona defenders.

The mistake ended Murray's streak of 96 passes without an interception.

Christian McCaffrey celebrates

San Francisco 49ers running back Christian McCaffrey, center, celebrates after scoring against the Arizona Cardinals during the second half of an NFL football game Sunday, Dec. 17, 2023, in Glendale, Ariz.  (AP Photo/Matt York)

PATRIOTS' MATTHEW JUDON TAKES SWIPE AT NFL OFFICIALS' TREATMENT OF PATRICK MAHOMES

Arizona's Matt Prater cut the margin to 14-13 by making two field goals in the second quarter, one from 58 yards and another from 43.

Purdy briefly left during the second quarter with a left shoulder stinger after a big hit from Arizona's Dennis Gardeck, who was called for a 15-yard penalty. But the quarterback returned later in the drive and hit McCaffrey for a 5-yard touchdown with 1:14 left before halftime for a 21-13 lead.

Murray completed 26 of 39 passes for 211 yards, one touchdown and two interceptions. The Cardinals are 2-3 since he returned from a ACL tear in his right knee last month.

Emari Demercado added a 49-yard touchdown run in the fourth quarter. McBride caught 10 passes for 102 yards.

The Cardinals ran for 234 yards, finding some holes in the NFL's No. 1 rush defense.

Arizona got off to a hot start with Murray finding McBride twice for a total of 49 yards through the air before James Conner ran for a 2-yard touchdown, capping an efficient seven-play, 75-yard march.

But the 49ers weren't down long, responding with their own touchdown drive that ended with Purdy hitting a wide-open Samuel for a 12-yard touchdown.

CLICK HERE TO GET THE FOX NEWS APP

INJURIES

49ers: CB Deommodore Lenoir (ribs) left in the second half and didn't return.

Cardinals: TE Geoff Swain (calf) left in the second quarter and didn't return. ... WR Marquise Brown (heel) was also injured in the first half.

UP NEXT

49ers: Home vs. Baltimore on Dec. 25.

Cardinals: At Chicago next Saturday.