SAN FRANCISCO — Frank Gore, Colin Kaepernick, and Michael Crabtree pulled off the kind of grind-it-out win Jim Harbaugh wants to see during the December stretch run.
Gore ran for a 1-yard touchdown and reached 1,000 yards rushing for the sixth time in his career and the San Francisco 49ers beat the Miami Dolphins, 27-13, on Sunday.
Gore finished with 63 yards, Anthony Dixon also had a 1-yard scoring run, and Colin Kaepernick ran for a late 50-yard touchdown and threw for 185 yards in his fourth straight start since being promoted over Alex Smith.
NFL sacks leader Aldon Smith added two more to his total for 19½, passing Fred Dean’s franchise-best single-season mark of 17½ set in 1983. Smith also moved within three sacks of Michael Strahan’s seasonal NFL record set in 2001 with the Giants.
Crabtree had nine catches for 93 yards and rookie LaMichael James ran for 30 yards in a solid NFL debut for the 49ers (9-3-1), who kept hold on the No. 2 seed in the NFC behind Atlanta.
Anthony Fasano made a diving 3-yard touchdown catch for Miami (5-8) midway through the fourth quarter on a perfect pass from Ryan Tannehill. Fasano’s right knee landed in the end zone as he fell out of bounds under pressure from safety Donte Whitner.
Harbaugh’s NFC West-leading Niners hardly looked like a power for most of the afternoon against overmatched Miami — a team Harbaugh considered coaching before accepting a $25 million, five-year contract with San Francisco in January 2011.
‘‘These games are really hard,’’ said Harbaugh, whose team will try to finish a season sweep of the AFC East when it faces the Patriots Sunday night in Foxborough. ‘‘You’ve got to stay patient. We also took our shots.’’
The 49ers took advantage of a special teams blunder to end a five-quarter stretch without a touchdown. Marcus Thigpen fumbled trying to catch Andy Lee’s punt early in the third quarter, and C.J. Spillman recovered on the Dolphins’ 9 to set up Gore’s short TD burst.
Cameron Wake had three first-half sacks to highlight a lackluster day by the Dolphins. On offense, rookie quarterback Tannehill faced constant pressure.
Dan Carpenter kicked a 53-yard field goal in the third quarter for the Dolphins and also a 28-yarder earlier.
Miami was held to 227 total yards.
‘‘We just have to finish,’’ Miami defensive tackle Paul Soliai said. ‘‘We just can’t let this happen.’’
San Francisco went for it on fourth and 1 on the 38 late in the third quarter and Dolphins cornerback Sean Smith was called for pass interference against Crabtree.
Dixon scored his second touchdown of the season five plays later to make it 20-6.