MIAMI -- Even in the offseason, the Miami Dolphins' quarterback carousel keeps spinning.

After being spurned by Peyton Manning, the Dolphins had a brief, unproductive courtship with Matt Flynn, then turned their attention Sunday to Alex Smith, the San Francisco 49ers free agent.

Smith left the Miami complex after a 5½-hour meeting. Dolphins officials declined to comment on any details about this visit.

The 49ers were one of three finalists in the Manning sweepstakes but the former Indianapolis Colts quarterback has decided to sign with the Denver Broncos, sources told ESPN senior NFL analyst Chris Mortensen and ESPN NFL Insider Adam Schefter. A contract agreement is expected to be a formality. It is unclear if San Franciso will intensify its efforts to re-sign Smith now that Manning won't be signing with the team.

The 49ers had been working to re-sign Smith but also went to North Carolina last Tuesday to watch Manning work out at Duke. Smith, the No. 1 overall 2005 draft pick, enjoyed his best season in 2011 under first-year 49ers coach Jim Harbaugh, a former NFL quarterback.

Smith and Manning have the same agent, Tom Condon.

The San Francisco Chronicle, citing a league source, is reporting that Smith is considering changing agents because of a possible conflict of interest.

"This is the NFL. I guess nothing surprises me anymore," Smith told the South Florida Sun-Sentinel on Sunday.

"I never thought a year ago (Peyton) Manning would be a free agent either," Smith told the newspaper. "I'm never surprised by anything."

The 49ers emerged as a contender for Manning when the news surfaced that he worked out for Harbaugh at Duke. Manning also worked out for the Broncos on Friday at Duke, and for the Titans on Saturday in Knoxville, Tenn.

Manning has been rehabbing in North Carolina following a string of neck surgeries, which led Indianapolis to release him.

A new starting quarterback would be the Dolphins' 17th since Dan Marino retired following the 1999 season. Winless in postseason since 2000, they made signing Manning their top offseason priority, but he told them Thursday he would sign elsewhere.

They then courted Flynn, the former Green Bay Packers backup who had ties to new Dolphins coach Joe Philbin. Flynn visited Miami on Saturday, then agreed to terms Sunday on a multiyear deal with the Seattle Seahawks.

Flynn's contract with Seattle is worth $26 million with $10 million guaranteed, a league source told ESPN NFL Insider Adam Schefter.