On Friday, Jim Harbaugh said December football was only for the tough.

On cue, on the first day of the final month of the year, wide receiver Anquan Boldin and one of the NFL’s nastiest defenses playing starring roles in the 49ers’ 23-13 win over the Rams on Sunday at Candlestick Park.

In his best statistical performance since the season opener, Boldin had nine catches for 98 yards, while San Francisco (8-4) didn’t allow a touchdown until St. Louis managed a garbage-time score with 18 seconds remaining.

Boldin, who cemented a spot in the NFL’s tough-guy lore in 2008 when he missed just two games after his facial fractures were secured by 40 titanium screws and seven plates, had all nine of his catches in the first three quarters to help San Francisco build a 16-6 lead.

And that would be all the offense required. The seemingly resurgent Rams (5-7), who had outscored teams with winning records 80-29 in their previous two games, crashed to earth against the league’s sixth-ranked defense.

Before padding their stats in the final quarter, the Rams managed seven first downs, 122 yards and two field goals in the first 45 minutes.

Leading 16-6, the 49ers put the game away early in the fourth quarter when they stuffed a fake punt deep in St. Louis territory. The Rams, who had two successful fake punts en route to a 24-24 tie at Candlestick last year, tried a direct snap to Matt Giordano on Sunday.

The St. Louis safety, however, was smothered by Anthony Dixon for a five-yard loss and the San Francisco immediately made St. Louis pay for its failed trickery. On the next play, quarterback Colin Kaepernick tossed a 17-yard touchdown to tight end Vernon Davis to give the 49ers a 23-6 lead.

Meanwhile, Boldin’s breakout performance – he didn’t have more than six catches in a game since Week 1 – was certainly tied to the 2013 debut of Michael Crabtree (2 catches, 68 yards). The 49ers wide receiver, playing just over six months after he sustained a torn Achilles, started and assumed a heavy workload. He started slowly – drawing two penalties on the 49ers’ first drive – but flashed his old form by beating Rams cornerback Trumaine Johnson on a double move for a 60-yard catch-and-run in the third quarter.

Leading 6-0, the 49ers embarked on a 12-play, 72-yard touchdown drive and Boldin played a key role. Boldin had five catches for 55 yards on the six-minute march and drew an unnecessary roughness penalty on Johnson.