COLUMBIA, S.C. Sen. John McCain won a hard-fought South Carolina primary last night, avenging a bitter personal defeat in a bastion of conservatism and gaining ground in an unpredictable race for the Republican presidential nomination.
Democrats Hillary Rodham Clinton and Barack Obama split the spoils in Nevada caucuses marred by late charges of dirty politics.
"We've got a long way to go," Mr. McCain said in an interview.
The man whose campaign was left for dead six months ago quickly predicted that victory in the first southern primary would help him next week when Florida votes, and again on Feb. 5 when more than two dozen states hold primaries and caucuses.
"This is one step on a long journey," Mrs. Clinton told cheering supporters in Las Vegas.
She captured the popular vote, but Mr. Obama edged her out for national convention delegates at stake, taking 13 to her 12.
Mr. Obama issued a statement that said he had conducted an "honest, uplifting campaign ... that appealed to people's hopes instead of their fears."
If the Democrats had co-front-runners, the Republicans had none and looked to South Carolina to begin winnowing an unwieldy field.
The South Carolina Democratic primary is Saturday.
Mr. McCain defeated former Arkansas Gov. Mike Huckabee in a close race in the state that snuffed out his presidential hopes eight years ago. The Arizona senator was gaining 33 percent of the vote to just under 30 percent for his closest rival.
"It just took us a while. That's all. Eight years is not a long time," he said.
Appearing before supporters, Mr. Huckabee was a gracious loser, congratulating Mr. McCain for "running a civil and a good and a decent campaign."
Far from conceding defeat in the race, he added: "The process is far, far from over."
Former Tennessee Sen. Fred Thompson was in a struggle for third place with about 16 percent, after saying he needed a strong showing to sustain his candidacy.
Interviews with South Carolina voters leaving their polling places indicated that Mr. McCain and Mr. Huckabee were dividing the Republican vote evenly. As was his custom, Mr. McCain was winning the votes of self-described independents.
South Carolina was the second half of a campaign double-header for Republicans.
Former Massachusetts Gov. Mitt Romney cruised to victory earlier in the day in the little-contested Nevada caucuses.
No matter the state, the economy was the top issue in all three races on the ballot.
Republicans in Nevada and South Carolina cited immigration as their second most-important concern.
Among Democrats in Nevada, health care was the second most-important issue followed by the Iraq war, which has dominated the race for months.
With three contests on the ballot, it was the busiest day of the presidential campaign to date, and fittingly enough for a pair of wide-open races, every contest produced a different winner. Mr. Romney rolled to victory in Nevada, winning roughly 50 percent of the vote in a multicandidate field.
With a black man and a woman as the leading contenders, the Democratic race was history in the making and increasingly testy, as well.
Before the votes were tallied, Mr. Obama was critical of former President Bill Clinton, telling reporters, "It's hard to say what his intentions are. But I will say that he seems to be making a habit of mischaracterizing what I say."
Mr. Clinton declined to comment on the allegation.
Mr. Obama's campaign said yesterday it is giving charity more than $40,000 in past political contributions linked to Chicago real estate developer and fast food magnate Antoin "Tony" Rezko, who is facing federal corruption charges.
The contributions are from seven individuals who contributed to Mr. Obama's House and Senate campaigns. None of the money was for his current presidential bid.
Mr. Romney headed to Florida before the Nevada results were counted. In Jacksonville, he called his Nevada victory, coupled with his Tuesday win in Michigan, "huge for us."
"I'd love to win Florida, of course. It's a very big state with a lot of delegates and I care very much about Florida," he said.
Rudy Giuliani campaigned yesterday in the Everglades and The Villages.
"Come on down," he said to his rivals. "We're waiting for you with a campaign we've been working on for I think almost a year."
Later, on CNN, he said the undecided race means his strategy "has kind of worked out, because this is a wide-open field. They all have to come down here."
Interviews with Democratic caucus-goers indicated that Mrs. Clinton fashioned her victory by winning about half the votes cast by whites and two-thirds support from Hispanics, many members of a Culinary Workers Union that had endorsed Mr. Obama. He won about 80 percent of the black vote.
He had pinned his Nevada hopes on an outpouring of support from the 60,000-member union. But it appeared that turnout was lighter than expected at nine caucuses established along the Las Vegas Strip, and some attending held signs reading, "I support my union. I support Hillary."
Democrats looked next to South Carolina to choose between Mr. Obama, the most viable black candidate in history, and Mrs. Clinton, seeking to become the first woman to occupy the White House. The state is home to thousands of black voters, who are expected to comprise as much as half the Democratic electorate.
After that, the race goes national, with more than 20 states holding primaries and caucuses on Feb. 5 and 1,678 national Democratic convention delegates at stake.
Mr. Romney had campaigned for months to win early contests in Iowa and New Hampshire, and his candidacy was in trouble when he lost both. He retooled his appeal to the voters in the days leading to the Michigan primary, though, focusing on the economy and trumpeting his experience as a businessman.
En route to Florida, he presented reporters with his ambitious economic stimulus plan, $233 billion in all. It includes tax rebates and tax cuts for individuals, as well as tax cuts for businesses.
Mormons gave Mr. Romney about half his votes. He is hoping to become the first member of his faith to win the White House. Alone among the Republican contenders, Rep. Ron Paul of Texas aired TV ads in Nevada. He was narrowly ahead of Mr. McCain for second place. Mr. Thompson and Mr. Huckabee trailed.
Mr. Romney also won at least 17 of the 31 Republican National Convention delegates at stake. Mr. McCain and Mr. Paul won at least four apiece, while Mr. Thompson and Mr. Huckabee each won two. California congressman Duncan Hunter and Mr. Giuliani each won one delegate the first of the campaign for the former New York mayor.