WASHINGTON — John McCain effectively clinched the Republican nomination for president Thursday when Mitt Romney abandoned his candidacy, leaving Mike Huckabee as a final but minor obstacle to a resolution of the yearlong race.
Romney's exit came in an emotionally charged speech to a boisterous gathering of conservatives whose hostility toward McCain underscored the challenge that he still faces in uniting Republicans often irked by his rebel streak.
Groans erupted among members of the Conservative Political Action Conference gathered in a packed hotel ballroom as Romney announced his withdrawal. To stay in the race, he said, would make it easier for a Democrat to win, "and in this time of war, I simply cannot let my campaign be a part of aiding a surrender to terror."
"This is not an easy decision for me," said Romney, whose eyes welled with tears. "I hate to lose."
The Boston investment tycoon and former governor of Massachusetts went on to say that he "must now stand aside -- for our party and for our country."
With that, McCain lost his closest rival for the nomination, having already dispatched former New York Mayor Rudolph W. Giuliani, former Tennessee Sen. Fred Thompson and a cast of lesser-known contenders.
"As a matter of political practicality, this is over," said Rich Galen, a Thompson advisor.
For McCain, Romney's departure effectively marked the end of a tumultuous struggle for the nomination. McCain started as the front-runner, then plummeted in the polls, went broke and slashed his staff, only to surge back to the top after winning the New Hampshire primary a month ago.
But the party's conservative wing remains reluctant, at best, to embrace its presumptive nominee. The fate of McCain's quest for the presidency now rides in no small part on one question: Will his friction with the party's conservative base offset his broad appeal among independents?
Even as he racked up new support from the GOP establishment -- Senate Minority Leader Mitch McConnell joined McCain's ranks on Thursday -- Republicans openly denounced him at the conference of conservatives.
McCain, who spoke to the group a few hours after Romney, tried to overcome their misgivings. Hundreds of McCain supporters cheered, but they failed to entirely drown out pockets of booing.
"Many of you have disagreed strongly with some positions I have taken in recent years," McCain said. "I understand that. I might not agree with it, but I respect it for the principled position it is."
McCain recited his record fighting abortion, gun control and the government's "hugely expensive" prescription-drug program for the elderly.
In an atmosphere of conservative fury over illegal immigration, McCain's sponsorship of last year's Senate bill providing a path to citizenship for millions of undocumented workers was the prime source of irritation. He told the crowd a top priority would be "to secure our borders first," and solve related problems in a way that "does not encourage another wave of illegal immigration."
But many in the room wondered aloud whether they could vote for McCain in November. Beyond immigration, they questioned his record on tax cuts, the appointment of conservative judges and more.
"We have to make a decision about how strongly we want to defend our conservative principles versus what we think will happen to the country if the presidency goes back to the Democratic Party," said Jim Clark, 61, a technology consultant from Columbia, Md. "It's not an easy road to walk."
Offering himself as a conservative alternative to McCain is Huckabee, a former Baptist minister. Huckabee's popularity among white evangelicals has fueled victories in Iowa, Georgia, Tennessee, Alabama, West Virginia and Arkansas.
"This is a two-man race for the nomination, and I am committed to marching on," said Huckabee, a former governor of Arkansas, after Romney's withdrawal. He said his dedication to "protecting life and traditional marriage," border security, and a new national sales tax to replace income and other taxes would keep him in the race.
Huckabee could score more party delegates in the Kansas and Louisiana contests Saturday and in the Virginia primary Tuesday, but his continued candidacy would only slow, not stop, McCain's march to the 1,191 delegates needed to capture the nomination.
So far, McCain has 707 delegates; Romney, 294; Huckabee, 195; and Rep. Ron Paul of Texas, 14, according to the Associated Press. Which candidate will wind up with Romney's delegates remains a question mark, but advisors to both McCain and Romney said the Arizona senator would soon accrue the necessary number without them.
"It's done, for all practical purposes," McCain advisor Charles Black said.
McCain yanked his Virginia TV ads on Thursday. But as long as Huckabee stays in the race, aides said, McCain will keep campaigning, with stops today in Virginia Beach; Wichita, Kan.; and Seattle.