DES MOINES, Iowa — Rep. Tom Tancredo, who built his longshot presidential campaign on opposition to illegal immigration, dropped out Thursday and endorsed Republican rival Mitt Romney as the best man to carry on the fight.

Tancredo, a five-term congressman from Colorado, has consistently polled at the bottom of the nine-person Republican field. He announced his withdrawal two weeks before Iowa begins the presidential nominating process with its precinct caucuses.

He said he decided to drop out in part because of concern that staying in could split the vote for other candidates who have taken a hard line on immigration, helping those who would take a less restrictive approach.

"I fear remaining in this race, one which I cannot win, would contribute to the nomination of one of these candidates," he said.

Tancredo identified former Arkansas Gov. Mike Huckabee and Arizona Sen. John McCain as two Republican candidates whose records indicate they wouldn't be tough enough on immigration.

He said Romney has a proven record of opposing illegal immigration while governor of Massachusetts, ending driver's licenses and in-state tuition for illegal immigrants.

"On the other hand, you talk about what's happened in Arkansas, it's a totally different situation, and certainly John McCain has built a career in Congress being a supporter of illegal immigration and amnesty," Tancredo said.

He also said Huckabee's recent rise in the polls was a factor in his decision to drop out of the race.

Romney was campaigning in Iowa and planned to make a statement later Thursday.

Romney meets with TancredoTancredo said he and Romney met Thursday for more than an hour and he left the meeting convinced that the former Massachusetts governor would do what's necessary to fight illegal immigration.

"He is the best hope for our cause," Tancredo said.

None of the other candidates, including Romney, has hit the issue as hard as Tancredo. One of his campaign ads showed a man in a hooded sweat shirt with a backpack in a crowded mall. The screen went dark at the sound of an explosion, then showed clips of the aftermath of terrorist acts in Europe.

Dennis Goldford, a political science professor at Drake University in Des Moines, said Tancredo forced his GOP rivals to talk about immigration.

"What Tancredo has done is analogous to what a third-party candidate does," Goldford said. "They call attention to and articulate an issue that the other two main parties neglect or don't see" and then after forcing the issue they disappear.