SAN FRANCISCO -- The 49ers' offense sputtered for most of three quarters in Colin Kaepernick's fourth start at quarterback.
But the 49ers maintained their 1 1/2-game lead in the NFC West on Sunday due to a strong performance from the defense and a key takeaway on special teams.
The 49ers don't get many style points for their 27-13 victory over the Miami Dolphins at Candlestick Park
The 49ers (9-3-1) can clinch a spot in the NFC playoffs next week with a victory over the New England Patriots. The 49ers finish the season at the Seattle Seahawks and at home against the Arizona Cardinals. The Seahawks remain 1 1/2-games behind the 49ers in the division standings with a blowout victory over the Cardinals on Sunday.
Kaepernick had a solid statistical day, completing 18 of 23 passes for 185 yards and adding a 50-yard touchdown run in the fourth quarter. But the 49ers had a difficult time converting on third downs and the game remained tight into the second half.
But the Dolphins had a lot more difficulty moving the ball against the 49ers.
The 49ers' big break came early in the third quarter when Dolphins return man Marcus Thigpen muffed an Andy Lee punt. C.J. Spillman recovered at the Miami 9-yard line.
Anthony Dixon gained 8 yards around the left side. Then, Frank Gore carried it into the end zone for a 1-yard touchdown to give the 49ers a 13-3 lead with 11:17 remaining in the third quarter.
Gore tied the franchise record of 50 rushing touchdowns, a mark he now shares with Hall of Fame running back Joe Perry and Roger Craig. Perry had 68 rushing touchdowns with the 49ers, but 18 came when the 49ers played in the All-America Football Conference. The team does not recognize statistics in the non-NFL games that 49ers played from 1946 to 1949.
Gore also eclipsed the 1,000-yard mark for the sixth time in his eight-year career.
Gore's 19-yard gain on the first play of the fourth quarter set up Anthony Dixon for a 1-yard touchdown run to give the 49ers a 20-6 lead with 14:27 remaining. The play capped a 13-play, 83 yard drive that took 7 minutes and 26 seconds.
FIRST-HALF FIELD GOALS: A lackluster first half ended with a bizarre sequence of plays and the 49ers settled for David Akers' 37-yard field goal to take a 6-3 lead on the final play before the intermission.
The 49ers had a first down at the 11-yard line, but a mix-up in protection left Dolphins defensive end Cameron Wake with a clear path to Kaepernick for his third sack of the game.
LaMichael James was stopped for a 2-yard loss on second down, and with the clock winding down, Kaepernick's incomplete throw out of bounds barely left enough time for Akers' kick.
Earlier, Akers hit from 30-yards out. The Dolphins scored their only points of the first half on Dan Carpenter's 28-yard field goal. Later in the third quarter, Carpenter nailed a 53-yard field goal.
SMITH SETS MARK: Outside linebacker Aldon Smith took over sole possession of the 49ers' single-season sack record. Smith ran over Miami Dolphins rookie left tackle Jonathan Martin to pick up sack No. 18.5 of the season. Smith previously shared the 49ers franchise record of 17.5 sacks with Hall of Famer Fred Dean (1983).
Smith leads the NFL in sacks. He is four sacks behind Michael Strahan for the NFL single-season record, which Strahan set in 2001.
With 32.5 sacks in his first two seasons, Smith has more sacks in his first two seasons than any player since the NFL began keeping sack statistics in 1982.
ROOKIE DEBUTS: James and receiver A.J. Jenkins made their NFL debuts on Sunday. James got the call as an active player when the 49ers decided to deactivate veteran Brandon Jacobs, while Jenkins got onto the field for limited action with Mario Manningham out with a shoulder injury.
James carried the ball eight times for 30 yards and added a 15-yard reception, while Jenkins didn't record a catch.
Jacobs was not among the 49ers' active players. Jacobs has been outspoken in recent days via social media against 49ers coaches, his playing time and the team's fans.
Jacobs was seen prior to kickoff talking with 49ers general manager Trent Baalke on the field. The two men had a brief chat, and Baalke concluded it with what appeared to be an encouraging tap on Jacobs' chest.
THIS 'N' THAT: Defensive lineman Demarcus Dobbs sustained what appeared to be a serious right knee injury in the second quarter. He was carted into the locker room and was immediately ruled out for the game. Dobbs is the only 49ers player who has a role on each of the 49ers' special-teams units. He returned to action after missing a game for being arrested on suspicion of DUI and alleged marijuana possession. . . The 49ers entered the game with six consecutive victories at home against AFC opponents. The 49ers outscored the opposition 146-44 in those games and did not surrender a touchdown in four of those games. . . . In the five previous games in which the 49ers lost the previous game in the Jim Harbaugh era, the 49ers did not allow a touchdown. The 49ers lost to the St. Louis Rams last week. The Dolphins got into the end zone on tight end Anthony Fasano's 3-yard touchdown catch from quarterback Ryan Tannehill with 7:55 remaining in the fourth quarter.