The San Francisco 49ers blew out the Miami Dolphins, 33-17, on Sunday, but it came at a price.

Head coach Kyle Shanahan told reporters that quarterback Jimmy Garoppolo will miss the rest of the season after suffering a broken left foot that requires surgery to fix.

"He’ll be out. He’ll end up needing surgery. Broke a few things in there, so real unfortunate to have that," Shanahan said via NBC Sports Bay Area.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Jimmy Garoppolo throws

Jimmy Garoppolo of the San Francisco 49ers attempts a pass during the first quarter against the Miami Dolphins at Levi's Stadium on Dec. 4, 2022, in Santa Clara, California. (Ezra Shaw/Getty Images)

"Just hearing it, it was pretty crushing. We know what Jimmy’s been through. We know how hard he worked at this."

Shanahan added that he told Garoppolo's teammates about the injury after the win, which caused "mixed emotions" after San Fran took down one of the best teams in the AFC with force.

It was on the Niners' first offensive drive of the game when Jaelan Phillips and Jordan Baker wrapped up Garoppolo and brought him to the ground for a sack. But as he was going down, the two defenders fell on Garoppolo's foot, causing the breaks. 

Garoppolo was seen carted into the locker room and didn't return to the game. 

This is the second season-ending injury to happen to a 49ers quarterback as Trey Lance, who Garoppolo backed up to start the season, fractured his ankle in Week 2 against the Seattle Seahawks.

JOE MONTANA TALKS DESHAUN WATSON EXPECTATIONS AFTER LONG LAYOFF, TOM BRADY'S DOMINANCE AND HELPING SENIORS

Garoppolo then became the starter and activated his incentive-laden deal that saw tremendous payouts per game if he were taking 25% or more of offensive snaps, won the game and more.

With San Francisco seeming to have playoffs in sight, that would’ve led to more payouts.

Instead, Brock Purdy, the 49ers’ seventh-round pick out of Iowa State in the 2022 NFL Draft, had to take over against a dangerous Miami team. Purdy has barely sniffed NFL action this season, but using the vast amount of offensive weapons around him, he got the job done. 

Purdy finished the game with 210 yards on 25 of 37 with two touchdown passes and one interception thrown (Xavien Howard finally got his first pick of the year).

Nick Bosa and Trent Williams celebrate

Trent Williams of the San Francisco 49ers hugs Nick Bosa during the fourth quarter against the Miami Dolphins at Levi's Stadium on Dec. 4, 2022, in Santa Clara, California. (Ezra Shaw/Getty Images)

Purdy relied heavily on star running back Christian McCaffrey, who had 66 yards on 17 carries and caught eight passes for 80 yards and a touchdown. 

But it was Kyle Juszczyk who caught Purdy’s first career touchdown pass, a 3-yard leak out into the flat on the Niners’ first drive without Garoppolo under center. 

Deebo Samuel and Brandon Aiyuk helped out as well, with Samuel totaling 56 yards on six catches and Aiyuk recording five receptions for 46 yards. 

49ERS' JIMMY GAROPPOLO EXPRESSES FRUSTRATION WITH LOW HIT FROM SAINTS PLAYER: ‘THERE’S NO PLACE FOR THAT'

Miami got off to the best start you could think of in this game, too, with Tua Tagovailoa finding Trent Sherfield for a 75-yard touchdown on the first play of the game. But Miami could only total two touchdowns in this contest as the Niners defense started to make things very difficult.

Tagovailoa was sacked three times and pressured a bunch more as the Niners forced him to make uncomfortable throws that went awry. Tyreek Hill still finished with 146 yards on nine catches with a score, but other than Sherfield’s big play, no one else could work in the pass game.

On the ground, San Fran made sure to bottle up the dual threat of Raheem Mostert and Jeff Wilson Jr., leaving the Dolphins with just 33 rushing yards the whole game. 

Jimmy Garoppolo drops back to pass

Jimmy Garoppolo of the San Francisco 49ers attempts a pass during the first quarter against the Miami Dolphins at Levi's Stadium on Dec. 4, 2022, in Santa Clara, California. (Ezra Shaw/Getty Images)

So, while the 49ers were psyched by their performance that gave them an 8-4 record on the season, they will have to dig deep and hope they can continue winning with Purdy – or perhaps someone else – under center the rest of the way.

CLICK HERE TO GET THE FOX NEWS APP

That first test will be against Tom Brady and the Tampa Bay Buccaneers next Sunday. The Dolphins will hope to regroup and beat the Los Angeles Chargers on the road.