SANTA CLARA — Defensive end Nick Bosa said if he did not know any better, he would have thought the building was burning down.
After two consecutive losses, the 49ers needed to get back on the winning track following back-to-back poor performances.
“We’ve lost some guys, but I haven’t lost confidence in this group one bit,” Bosa said. “So I think we’re going to be just fine.”
Stay in the game with the latest updates on your beloved Bay Area and California sports teams! Sign up here for our All Access Daily newsletter.
The 49ers were just fine Sunday in a 30-13 victory over the New England Patriots at Levi’s Stadium.
It was not a perfect game, of course, but it was more than good enough to break the 49ers’ two-game losing streak and even their record at 2-2.
Here’s is a look at the 49ers’ grades from their Week 4 victory over the Patriots:
Rushing offense
San Francisco 49ers
Find the latest San Francisco 49ers news, highlights, analysis and more with NBC Sports Bay Area and California.
The 49ers had success on the ground. Jordan Mason gained 123 yards and a touchdown on 24 rushing attempts.
Mason did not start. That honor went to Deebo Samuel, who lined up in the backfield for the first snap of the game.
As a team, the 49ers gained 148 yards on 32 rushing attempts for a 4.6-yard average.
Quarterback Brock Purdy picked up a couple of first downs on the first scoring drive with third-down scrambles.
Grade: B-plus
Passing offense
Purdy did not have one of his more sharp performances, but he still made plenty of plays with downfield throws.
Jauan Jennings led the team in receiving yards with three catches for 88 yards. Samuel had three receptions for 58 yards. His 53-yard catch was a big play for the 49ers early in the second half.
George Kittle made a remarkable 12-yard catch against triple coverage for a touchdown to give the 49ers a 20-0 lead in the second quarter. He finished with four catches for 45 yards.
The offensive line provided outstanding pass protection. Purdy was sacked one time, but that came on a play that lasted nearly 10 seconds.
Purdy completed 15 of 27 pass attempts for 288 yards with one touchdown and one interception. New England defensive back Jabrill Peppers picked off Purdy in the end zone.
Grade: B
Rushing defense
The 49ers knew the Patriots would try to run the ball. They were prepared to make sure Rhamondre Stevenson did not get into a groove.
Stevensen gained just 43 yards on 13 rushing attempts. Defensive end Sam Okuayinonu forced a fumble that Maliek Collins recovered.
The Patriots averaged just 3.0 yards on 24 rushing attempts.
The 49ers’ front four controlled the line of scrimmage. Safety Ji’Ayir Brown led the 49ers with eight tackles, while Fred Warner and De’Vondre Campbell registered seven tackles apiece.
Grade: A-minus
Passing defense
Warner got the 49ers going with a leaping interception and 45-yard return for a touchdown early in the second quarter.
Some of the lesser-known players on the 49ers’ defensive line came up with big performances in the San Francisco's first game without Javon Hargrave.
Defensive tackle Kevin Givens had a big day with a career-best 2.5 sacks. Collins added 1.5 sacks and Evan Anderson added one sack in his NFL debut.
The 49ers elevated Anderson, an undrafted rookie from Florida Atlantic, from the practice squad Saturday to provide depth.
Nick Bosa put the game away with a strip sack and fumble recovery with less than three minutes remaining.
Grade: A
Special teams
Another week, another bad special-teams mistake. This miscue led to the Patriots’ only touchdown of the game but did not cost them the game.
Rookie Isaac Guerendo fumbled the opening kickoff of the second half.
Kicker Jake Moody made field goals of 22, 26 and 41 yards. His last kick gave the 49ers a 30-13 lead with 4:58 remaining in the game.
Mitch Wishowsky and the punt coverage unit averaged just 31.3 net yards on three punt attempts.
Grade: D-plus
Coaching
The 49ers did not have to do much in this game against an overmatched opponent. They did what needed to be done with their game plans on both sides of the ball.
The 49ers out-gained the Patriots 431 yards to 216 on the game.
Third downs were key in this game, and the 49ers were prepared for those packages. The 49ers converted 7 of 13 (53.8 percent) of their third-down opportunities, while the Patriots succeeded on third downs on just 6 of their 16 attempts (31.3 percent) against Nick Sorensen’s defense.
Grade: B
Overall
This was a good Week 4 game for the 49ers. They got the win and still have plenty of things to correct as they prepare to face the Arizona Cardinals in seven days.
The 49ers had two touchdowns called back due to penalties. They had six penalties for 43 yards. Their penalties included too many men on the field, illegal motion, ineligible downfield and two illegal shifts.
They also had another big mistake on special teams, but none of that mattered on this day.
Grade: B-minus