In a speech that touched on the messages of his campaign, Mr. Romney said he had come to his decision to help unify the Republican Party, and he charged that Democratic candidates, Senators Hillary Rodham Clinton of New York and Barack Obama of Illinois, would not pursue the war in Iraq.

Image Mitt Romney announced his withdrawal from the presidential race at the Conservative Political Action Conference in Washington on Thursday. Credit... Stephen Crowley/The New York Times

“Because I love America, in this time of war, I feel I have to stand aside for our party and our country,” he said.

Mr. Romney had hoped to use Tuesday’s results to narrow Mr. McCain’s lead. Instead, he saw Mr. McCain widen the lead at the same time that Mr. Romney’s campaign lost ground to Mike Huckabee, the former Arkansas governor, who racked up solid gains.

Mr. Huckabee, on his way to an appearance on “The Tyra Banks Show” in Manhattan, said Thursday afternoon that he hoped that Mr. Romney’s conservative supporters would back his campaign.

“I know that a lot of the establishment, Washington-type folks are going to be going with Senator McCain,” he said. “I understand that. but the people of this country need a choice. And right now, I am going to be their choice.”