Both teams struggled to move the ball in the first half, as San Francisco (9-3-1) and Miami (5-8) traded field goals in the second quarter. The Dolphins opened the scoring with 28-yarder from David Carpenter 1:29 into the quarter, and the 49ers answered with two kicks from David Akers, including a 37-yarder on the final play of the half, to take a 6-3 lead into the locker room.
San Francisco scored the game's first touchdown with 11:17 left in the third quarter, when Frank Gore plunged one yard into the end zone. Miami responded midway through the quarter with another Carpenter field goal, this one from 53 yards.
Anthony Dixon scored from one yard out to give the 49ers a comfortable 20-6 lead 33 seconds into the final quarter, but the Dolphins pulled within a score when Ryan Tannehill hooked up with Anthony Fasano for a three-yard touchdown with 7:55 remaining in regulation. Facing third-and-5, San Francisco quarterback Colin Kaeperick put the game away with a 50-yard touchdown run with 2:10 left in the game.
The 49ers pulled out a crucial victory in their quest for another division title. With three games remaining, San Francisco holds a 1½-game lead over the Seattle Seahawks in the NFC West. The teams' meeting in two weeks could be the deciding factor in the divisional race.
The Dolphins suffered a major blow to their already slim playoff hopes. Miami is two games back of the AFC's final Wild Card spot with six teams in the hunt holding equal or better records.
Best/worst stat of the game
The 49ers won by two scores despite converting just 2 of 9 third downs. That doesn't happen too often.
Until his final scoring run, Kaepernick didn't provide much in the way of fantasy results, but that score alone was worth 11 points in the average league. Kaepernick finished with 185 yards, zero touchdowns and zero interceptions on 18 of 23 passing, and he rushed for 53 yards and the one TD. In addition to holding Miami to 13 points, the San Francisco defense forced a turnover and limited the Dolphins to 227 yards.
Dolphins running back Reggie Bush wasn't able to make a big impact, compiling 65 yards on the ground and five catches for 38 yards. Aside from Michael Crabtree, no San Francisco receiver had more than 30 yards.
The 49ers opened as 10-point favorites, and at some sportsbooks, they were favored by as many as 11 points. Kaepernick's late score ensured a San Francisco cover. For more NFL lines, check out SB Nation's NFL odds hub.
San Francisco tight end Demarcus Dobbs left the game in the first quarter with a right knee injury, and he didn't return. Miami linebacker Koa Misis was knocked out in the third quarter with an apparent right foot injury.
Next team on the schedule
12/16: Jaguars at Dolphins, 1 p.m. ET, CBS
12/16: 49ers at Patriots, 8:20 p.m. ET, NBC