SANTA CLARA, Calif. (AP)The switch to a third-string rookie quarterback has done nothing to slow down the surging San Francisco 49ers.

Instead, with Brock Purdy running a talented offense combined with the NFL’s stingiest defense, the Niners are enjoying their most dominant stretch ever under coach Kyle Shanahan.

A banged-up Purdy threw two more TD passes and the defense did much of the rest of the work Thursday night when the 49ers clinched their second division title in the last 10 seasons by beating rival Seattle 21-13 on Thursday night.

”This isn’t our final goal by any means,” Shanahan said. ”I’m very proud of our team, what we accomplished throughout the year to get to this. Our goal is to get in the tournament. We accomplished that. Now it’s all trying to set that up to be the best situation we can.”

Instead of falling apart after Jimmy Garoppolo broke his foot in the first quarter of a Week 13 win over Miami, the 49ers (10-4) haven’t missed a step and look like one of the top contenders in the NFC.

They have outscored the opposition 86-30 since Purdy took over the offense.

”He’s definitely the most poised rookie I’ve ever had,” Shanahan said. ”He’s been like that since he’s gotten here.”

The Niners have won seven straight games for their earliest clinching since 2011. They have allowed 17 points or fewer in all of those games – something they had only done in a seven-game win streak in one season in their 1981 and ’84 Super Bowl campaigns.

Purdy has had plenty of help with the midseason addition of Christian McCaffrey providing a big spark to the offense.

But he has more than done his job as well. Since taking over for Garoppolo, Purdy has completed 69% of his passes, with six TDs, one interception and a 108.8 passer rating.

He has earned the respect and admiration from his teammates and coaches and now is in position to lead a team into the playoffs after being the final pick of the draft in April.

”It’s special and everything,” he said. ”Honestly I’m just like another component. I’m another piece of this team in terms of a guy coming in, doing what he’s asked. I’m the quarterback. I have to make decisions. I trust in how the coaches teach me throughout the week. I just try to get the ball out to the guys on time.”

WHAT’S WORKING

Pass rush. The Niners put constant pressure on Geno Smith led by Nick Bosa and Arik Armstead. Smith was under pressure on 17 of 48 dropbacks, according to Pro Football Focus, with Bosa having six and Armstead five. Bosa leads the NFL with 15 1/2 sacks, becoming the fifth player since 1990 with back-to-back seasons with at least 15 sacks.

WHAT NEEDS WORK

Kicking game. Robbie Gould missed a 43-yard field goal that could have sealed the game late in the fourth quarter. The Niners also allowed two 31-yard kick returns by Godwin Igwebuike.

STOCK UP

CB Charvarius Ward. Given the tough matchup against DK Metcalf for most of the game, Ward more than held his own. He held Metcalf to just four catches for 33 yards, according to Pro Football Focus, with just one of those receptions gaining a first down. Ward also had a fumble recovery that he returned 40 yards to set up a TD.

STOCK DOWN

QB Trey Lance. The Niners traded three first-round picks to take Lance third overall in 2021 to be the franchise quarterback of the future. But after spending most of his rookie season as a backup and going down with a season-ending injury in Week 2 this year, Lance’s future is uncertain. Purdy is playing at a high level early in his career and could lock down the starting role with a successful playoff run.

INJURIES

Ward is in concussion protocol. … CB Ambry Thomas (ankle) and WR Danny Gray (hamstring) are day to day. … The Niners are planning to open the practice window next week for DT Javon Kinlaw (knee).

KEY NUMBERS

88. The 49ers have won their first five games in the division for the first time since 2002. San Francisco has outscored the opposition by 88 points in those games with a season-ender against Arizona remaining. The most lopsided season in point differential for an NFC West team since the start of the eight-division era came in 2018 when the Rams outscored their division opponents by 108 points.

WHAT’S NEXT

San Francisco hosts Washington on Dec. 24.

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