SAN FRANCISCO (AP) — Two years ago, both the Miami Dolphins and San Francisco 49ers wooed Jim Harbaugh to be their next coach.
The Niners won that courting competition and landed their high-profile man, luring him away from nearby Stanford and giving him a $25 million, five-year contract. And Harbaugh delivered immediately by taking his new team to the NFC championship game and oh-so-close to a Super Bowl as a rookie NFL coach.
Now, he has his 49ers (8-3-1) poised for another postseason run next month, with Miami (5-7) next up on the schedule come Sunday at Candlestick Park.
As rarely as these teams see each other being on opposite coasts and playing in different conferences, they certainly have pursued some of the same faces — most notably, of course, being Harbaugh.
Then, last spring, 49ers quarterback Alex Smith flew to South Florida for a visit with the Dolphins during a time when San Francisco's brass explored the possibility of signing Peyton Manning.
Manning wound up in Denver, Smith stayed put on a new three-year deal, while Miami drafted Ryan Tannehill. Smith has since lost his starting job to Colin Kaepernick after suffering a concussion against the Rams on Nov. 11.
Dolphins coach Joe Philbin didn't want to get into the details regarding how far talks went with Smith before he ultimately re-signed with San Francisco.
"We had a great visit and I'll leave it at that," Philbin said. "Any relationship takes two sides to tango and I think you should certainly ask him about that, but I have nothing but good things to say about him. I really enjoyed our visit."
Miami's immediate future — and long-term success, too — is riding on Tannehill's ability to get a stagnant offense going down the stretch for a Dolphins team determined to finish strong and avoid a fourth consecutive losing season after overhauling the operation heading into 2012.
"You can't win games consistently only scoring 19 points," Tannehill said. "That's a big focus of ours, to find a way to get more points on the board whatever way it is. We have to find a way."
He will face pressure all day from NFL sacks leader Aldon Smith as well as Justin Smith.
Both teams boast stingy, opportunistic defenses and mobile young quarterbacks still learning the ups and downs of the NFL through trial by fire.
Though the 49ers have hurt themselves of late with a plethora of penalties — hardly the way the NFC West leaders want to be playing in December.
With the season's stretch run ahead and Seattle close behind, San Francisco plans to do all in its power to play mistake-free football against the Dolphins.
Harbaugh, left tackle Joe Staley and linebacker Patrick Willis all insist then Niners need to clean things up in short order.
"We have had some big ones that have really stopped some drives," Harbaugh said. "Some of them were really, really questionable, in our opinion. ... There have been some big ones that have stopped drives or extended drives for the other team. That's not the way we want to play. That's not the 49er way of playing football."
While nobody wants to see mistakes at such an important stage of the season, Staley is convinced some basic attention to detail and the fundamentals might be all it takes to get back on track.
"It's a general trend. We just have to do a better job with our techniques," he said. "When you see some of the holding penalties, it's a technique flaw here or there. Some of those penalties happen in an awkward situation. You don't know where the play is going or it's designed to go one way and it goes the other way."
San Francisco struggled in a 16-13 overtime loss at St. Louis last week and now must be seriously concerned with Seattle right behind in the NFC West at 7-5. The Seahawks, who won in overtime at Chicago, host the 49ers in the second-to-last game on Dec. 23.
Harbaugh is sticking with the athletic, strong-armed Kaepernick this week for the second-year pro's fourth career start. Miami has faced its share of mobile quarterbacks in recent weeks — losing to Tom Brady last week — to know what Kaepernick might present.
The Dolphins' defense hopes to do its share of pressuring the quarterback, too.
"I'm always the spy. Every play I'm a spy," Dolphins defensive end Cameron Wake said. "That's my job title. Wherever the quarterback is, you've got to get there."
These Dolphins can relate to the 49ers' mistakes. They gave away 17 points because of a botched a punt, roughing-the-punter penalty and a — then had a touchdown taken away for another penalty.
Yes, Miami is just as eager for a fresh start after a 23-16 home loss to New England for its fourth defeat in the last five games. This one had a little extra sting watching Brady and Co. clinch the AFC East title on Miami's home field.
The 49ers, clinging to the No. 2 seed in the NFC playoff picture behind 11-1 Atlanta, realize they can't afford any slip ups the rest of the way.
"We're not pressing. We're not panicking here," Staley said. "These are huge games coming up, especially with the situation of us losing last week and Seattle winning. The division's very tight. These four games are huge games, all four of them. We look at it, as a team, that we need to win out and go to the playoffs with some momentum."