Play good defense, don't turn the ball over, come up with a few timely plays, win.

It used to be Alex Smith's formula for success, but now, with QB Colin Kaepernick running the show, it works the same.

In a game where neither offense was particularly effective, it was the host 49ers (9-3-1) that made a few more key plays in a 27-13 win against Miami. None was bigger than a 50-yard touchdown run from Kaepernick on third-and-5 with two minutes, ten seconds left in the game and the 49ers leading 20-13.

Following a botched option pitch last week against St. Louis, it was an option keeper that sprung Kaepernick free this time.

"Great call by (offensive coordinator) Greg (Roman)," coach Jim Harbaugh said. "And it was a  big third-down conversion. We'd been struggling on third downs. And to get that one to pop and get the the touchdown was great."

It was the longest rushing touchdown by a 49er in franchise history.

Kaepernick wasn't the only one who made history Sunday.

RB Frank Gore tied the franchise record with his 50th rushing touchdown and LB Aldon Smith added two sacks to break Fred Dean's 1983 single-season franchise record. Smith sits at 19.5 sacks this season, needing 3.5 in his final three games to break Michael Strahan's 2001 NFL record.

In his last six games, Smith has 14 sacks.
 
When the game turned: The game's outcome was in doubt until Kaepernick's run, but the play that really changed the game was a muffed punt by Miami punt returner Marcus Thigpen. San Francisco cover man C.J. Spillman jumped on the ball to setup the 49ers with first-and-goal and a touchdown to make it 13-3 quickly followed.
 
Highlight moments: 49ers S Donte Whitner channelled his inner WWE wrestler with a body-slam of RB Reggie Bush that quickly was turned into GIF magic. … Miami TE Anthony Fasano turned in the game's most impressive catch on a 3-yard TD pass from QB Ryan Tannehill. Fasano managed to get a knee down while making the one-handed grab that cut the 49ers' lead to 20-13 with 7:55 left in the game. ... RB Anthony Dixon scored his third career touchdown.

James, Jenkins debut: The 49ers' first two draft picks, WR A.J. Jenkins and RB LaMichael James both appeared for the first time this season. James had eight carries for 30 yards and returned three kickoffs for 79 yards, while Jenkins finished without a catch.
 
Top-shelf performances:

    •    49ers QB Colin Kaepernick -- 18 of 23 for 185 yards, 0 TD, 0 INT, 6 carries, 53 yards, 1 TD

    •    49ers WR Michael Crabtree -- 9 catches, 93 yards

    •    Miami DE Cameron Wake -- 6 tackles, 3 sacks

    •    49ers LB Aldon Smith -- 6 tackles, 2 sacks
 
What they said about LaMichael James' NFL debut:

    •    49ers coach Jim Harbaugh -- “I thought he was fantastic. Did a great job running the football. Thought he made the positive yards that were there. Plus, had a little extra burst through the hole. I thought it was really good. Great debut by LaMichael. Thought he acquitted himself really well."

    •    49ers RB LaMichael James -- “It's been a long time, but great things come when you're being patient. I'm just happy that I had the opportunity to go out there and compete and help the team win today."

    •    49ers RB Frank Gore -- "Happy for him. I saw LaMichael when he first got here and the offense was kind of tough for him. He wasn't used to playing in small spaces, but he did a heck of a job. Our coordinator (Greg Roman) did a great job putting him in great situations that he was used to doing in college and he keep me fresh."
 
Numbers you should know: Gore scored the 50th rushing touchdown of his career to tie him with Joe Perry and Roger Craig for the most rushing scores in franchise history. He also ran past the 1,000-yard mark for the season -- the sixth time he's done that in his career.
 
Injury update: Dolphins -- LB Koa Misi left with an apparent ankle injury, there was no update on his status after the game. 49ers -- DL/TE Demarcus Dobbs left with what appeared to be a serious knee injury and was on crutches in the locker room after the game. "Don't know exactly yet (how serious it is), will get more details tomorrow when I get an MRI," Dobbs said.
 
Going forward: Dolphins -- Miami dropped its fifth game in its last six chances and is out of contention for a playoff berth. It hosts games against Jacksonville and Buffalo the next two weeks before traveling to New England to end the season. 49ers -- With the emergence of Seattle, things are far from settled in the NFC West. The 49ers have a trip to New England looming next week before a trip to Seattle, where the Seahawks -- who won 58-0 today -- haven't lost this season. If San Francisco loses to New England and Seattle wins at Buffalo next week, the 49ers would hold a half-game lead in the division when they play on Dec. 23. San Francisco finishes with a game against the Cardinals, while Seattle closes with the Rams.

No ad available

Follow 49ers reporter Kyle Bonagura on Twitter @CBS49ers and @KyleBonagura.

For more up-to-the-minute news and analysis on the Miami Dolphins from blogger Dave Carey, follow @CBSDolphins.