"It took us a while but what's eight years among friends," he told the Associated Press in an interview.
The Arizona senator added to his victory in the New Hampshire primary, helped by the support of many of the political establishment that had supported then-Gov. George W. Bush in 2000.
"We showed that the first-in-the-South primary is a very important victory, and it gives us a very important progress that we can carry right through Florida and February 5th," he told the AP.
Speaking before a crowd of supporters chanting "Mack is back," McCain thanked the voters of South Carolina who turned out in stormy and snowy weather, saying, "I think I speak for all of the Republican candidates when I say South Carolinians are never just fair-weather friends."
"Before I can win your vote is first to earn your respect," he told the crowd. "We have a ways to go, my friends, and we have some tough contests ahead... but we are well on our way tonight."
Stressing a theme of smaller government, McCain pledged to carry their campaign on through the other contests of Florida and the 22 states set to vote on Feb. 5.
"We believe government should only do those things we cannot do individually," McCain said, saying he still believed in the principles that brought him into politics as "one of the foot soldiers of the Reagan revolution."
The growth of moderate voters in the state over the last eight years also appeared to aid McCain's victory. Some 25 percent of GOP voters called themselves moderates and among those, McCain beat Huckabee by more than 2-to-1. He also easily outdistanced his competition among older voters -- and a quarter were at least age 65.
According to exit polls conducted by the Associated Press, white evangelicals and cultural conservatives turned out in large numbers despite nasty winter weather throughout much of the state.
Huckabee found solid support among religious voters, a key of his support as at least half of those voting were white evangelical or born-again Christian, while six in 10 said they attended religious services at least weekly. Huckabee won nearly 40 percent of those voters, with McCain garnering about 25 percent.
"The reason I want to encourage you tonight is that politics is not an event it is a process. And the process is far, far from over," Huckabee told supporters.
"Tonight is not a time to ask what if, but it is a time to ask what now," he added.
Huckabee, who has failed to come in higher than third since his first-place showing in the Iowa caucuses, was hurt by the support many conservatives gave to former Tennessee Sen. Fred Thompson in some of the more conservative counties in northwest South Carolina.
"The path to the White House is not ending here tonight," Huckabee said as he pledged to continue his fight. "We're resetting the clock, resetting the gauges. We have learned and tomorrow, after a little bit of sleep, we wake up to fight the battle again and again."
As in Saturday's Nevada caucus contests, Republican voters said that the state of the economy was the most important issue driving their decision with illegal immigration running second, according to an Associated Press survey of 1,154 voters leaving 35 precincts in South Carolina's Republican primary.
A close battle for third was also unfolding between former Sen. Fred Thompson, who had pledged to make a last stand in South Carolina, and former Gov. Mitt Romney, who earlier in the day handily won the Nevada caucuses.
Romney, who left South Carolina on Thursday and watched the Palmetto State results come in from nearby Florida, called the Nevada results a key victory in his campaign for the White House.
He welcomed the results, saying the Republicans of Nevada would help him, "to get my hands on Washington and turn it inside out."
"Today, the people of Nevada voted for change in Washington. For far too long, our leaders have promised to take the action necessary to build a stronger America, and still the people of Nevada and all across this country are waiting," Romney said in a statement. "Whether it is reforming health care, making America energy independent or securing the border, the American people have been promised much and are now ready for change."
Romney found out that he had won in Nevada while flying to Florida, a state with a critical contest on Jan. 29.
Once on the ground, Romney spoke to reporters, saying, "We've made an effort to get to all of the early states, and we're going to make our best effort to get to the other key states in the days that follow, although Super Duper Tuesday is a difficult day to get 22 states, but we're going to be working hard."
While Romney could buffer his second-tier finish in South Carolina with a win in Nevada, the news was seen as a real blow to Thompson's campaign. The former senator entered the race later than any of the other major candidates and after a brief flurry of positive press coverage and a surge in the polls, Thompson struggled in both fundraising and in finding a message that resonated with GOP voters.
Headed into the balloting on Saturday, Thompson said South Carolina could impact his decision to go on with his campaign.
"We'll see how we have to do, we'll see what the results are," Thompson said, according to Politico.com. "I've always said I have to do very well here; there's no question about that. I stand by that."
"We have traveled a very special road together for a very special purpose," Thompson told supporters early in the evening. "Our country needs strong leadership, it needs our party to step up. But we need to remember that we need to deserve to lead, and that's what this is about, deserving to lead."
While some analysts were watching Thompson for hints as to the future of his campaign, California Congressman Duncan Hunter, who lined up one delegate to the convention in the Wyoming race, but generally has been mired in the bottom of most polls, decided to bow out of the campaign.
"Today we end this campaign. ... I ran the campaign exactly the way I wanted to, and at this point not being able to gain traction in conservative states of Nevada and South Carolina, it's time to allow our volunteers and supporters to focus on the campaigns that remain viable," Duncan said in a statement released to CNN.