Columbia, South Carolina (CNN) -- Newt Gingrich won Saturday's South Carolina GOP presidential primary, marking a stunning turnaround for a candidate who finished fourth in Iowa and New Hampshire and whose campaign had been left for dead -- again -- by observers just weeks ago.
With about 95% of polling places reporting, Gingrich had 40% of the vote, with former Massachusetts Gov. Mitt Romney getting 27% and former U.S. Sen. Rick Santorum getting 17%. U.S. Rep. Ron Paul of Texas had 13%. Based on early returns and exit polls, CNN projected Gingrich the winner.
In his victory speech to supporters, Gingrich thanked "everyone in South Carolina who decided to be with us in changing Washington."
"It is very humbling and very sobering to have so many people who so deeply want their country to get back on the right track -- so many people who are so concerned about jobs, about medical costs, about the everyday parts of life, and who feel that the elites in Washington and New York have no understanding, no care, no concern, no reliability, and in fact do not represent them at all," Gingrich said.
Gingrich, whose surge has been helped in part by two strong debate performances in South Carolina, said that if he's resonating with voters, it's not just because he's a good debater.
"It's that I articulate the deepest-held values of the American people," he said.
Since the beginning of the modern GOP primary system in 1980, this is the first time that three different GOP candidates won nominating contests in Iowa, New Hampshire and South Carolina. The winner of the South Carolina primary, which this year is the third contest on the primary and caucus calendar, has gone on to win the Republican nomination in every election since 1980.
Less than a week ago, Romney, the New Hampshire winner, was looking at a double-digit lead in most polls of likely voters in South Carolina, a big lead in Florida and the possibility of a clear path to the GOP nomination. But Gingrich turned in two strong debate performances in the state this week while Romney was put on his heels by his rivals.
Romney congratulated Gingrich in remarks to his supporters after polls closed Saturday night.
"This race is getting to be even more interesting," Romney said. "... We're now three contests into a long primary season. This is a hard fight because there is so much worth fighting for."
"Our campaign has fought very hard here in South Carolina, and in the coming weeks and months, I'll keep fighting for every single vote. I will compete in every single state," he said. "We're going to win this nomination, and we're going to defeat President Obama in November."
Santorum, the Iowa winner, also congratulated Gingrich on Saturday night. Nearly an hour earlier, he told CNN that the battle between the first three contests' winners is just beginning.
"The great narrative is that three days ago, there was an inevitability in this race," Santorum said. "Mitt Romney was 2-0 (before Iowa officials switched the narrow Iowa result this week) and soon to be 3-0, and I took Iowa, Newt took South Carolina, and it's game on again."
Santorum said he was preparing not only to campaign in Florida, where the next primary awaits on January 31, but in other states, indicating he believed he had what it took to sustain his campaign for a long fight.
"This is a long race. As a result of what happened here tonight, this race isn't going to be over next week or the week after," Santorum said. "This is going to be a long one, and it's going to be the best thing that could happen for whoever the eventual Republican nominee is, because that nominee is going to be sharpened by steel."
Paul told supporters he expected to get four to five times as many votes in South Carolina as he did four years ago.
"So there's every reason to be encouraged," he said.
Gingrich's Palmetto State turnaround is just his latest. He came out of nowhere to top national polls in late fall on the strength of debate performances, but dropped again ahead of the Iowa caucuses as opponents hammered him in Iowa ads.
"Gingrich has been harder to kill than Rasputin," Republican strategist and CNN contributor Alex Castellanos said Saturday. "He has been dead three times in this campaign, and ... the guy keeps coming back."
According to exit polls Saturday, 38% of voters said they decided whom to vote for in the "last few days," and 17% did so on Saturday. Of the "last few days" crowd, 44% voted for Gingrich, and 26% took Romney. Of those who decided Saturday, 44% voted for Gingrich, and 21% took Romney.
Gingrich won a plurality of votes among all income categories except the one for people making $200,000 a year or more, a category that Romney won with 47%, according to the exit polls.
The candidates will now focus on Florida, where they will debate in Tampa on Monday and at the CNN/Republican Party of Florida debate in Jacksonville on Thursday.
The former House speaker has been presenting himself as the conservative alternative to the "Massachusetts moderate" Romney, while Romney continued to attack Gingrich as he has over the past week as polls tightened.
Romney supporters and donors were grumbling Saturday that Romney's campaign badly mishandled how he responded to rivals' demands that he release his tax records. Romney said in a CNN debate Thursday night that he was not sure how many years of tax returns he plans to release but will make them public sometime in April.
But as the polls were closing, a Romney source tried to downplay the results, noting that Romney got only 15% of the vote in South Carolina in 2008, a race that eventual nominee Sen. John McCain won.
The campaign will immediately pivot to Florida, the source said, where "we have a strong organization and big plans for next week."
Romney has held a large lead in polls of likely primary voters there, but recent polls show the race tightening a bit there, too.
Three Republican sources told CNN that Romney has secured the endorsement of former Florida Gov. Jeb Bush, who is on many Republicans' wish list. But a Bush source denied the report, and sources in Romney's campaign said if that is true, he hadn't told them.
The campaign plans a "major" economic speech on Tuesday morning as a prebuttal to Obama's State of the Union address that evening and differentiate Romney from Obama and Gingrich. He also plans a reaction speech to Obama's address on Wednesday morning.
Romney launched a new line of attack on Gingrich on Saturday before polls closed, calling for him to release details on his work for government-backed mortgage giant Freddie Mac, an institution unpopular with conservatives.
"Didn't he say he was going to release information about his relationship there?" Romney asked. "Let's see what report he wrote for Fannie Mae and Freddie Mac, what his conclusions were and what the contract looked like. I thought he said he was going to do that."
Romney's campaign also has been pressing the former House speaker to release the full report from a 1990s ethics investigation that led to his downfall in Congress. Gingrich was reprimanded by the House and ordered to pay a $300,000 penalty in 1997 for violating an ethics rule.
This week, Romney's campaign sent Gingrich a cake marking the 15th anniversary of that reprimand, according to a Romney campaign source. A picture provided by that source shows the wording "Happy 15th anniversary, Mr. Speaker! ... Now release the records," written in icing on the cake.
Things reversed quickly for Romney in South Carolina this week.
As late as Tuesday, Romney had a double-digit lead in most polls of likely voters in the state's primary. Then what had been declared an eight-vote Romney victory in Iowa's January 3 caucuses was reversed into a 34-vote win for Santorum when the state party certified its results on Thursday.
Later that day, Texas Gov. Rick Perry suspended his campaign and threw his support to Gingrich.
"It has been a hard week," state treasurer Curtis Loftis, a leading Romney surrogate, said Friday. "Nobody is going to deny that."
Santorum spent the week trying to bring down Gingrich in what most see as a race between the moderate Romney against conservatives Gingrich or Santorum.
Although most GOP strategists see Paul's strict interpretation of the Constitution and his views on defense and spending as out of step with the mainstream, he appeals to libertarian-leaning Republicans and has a large following among younger voters.
CNN's Jim Acosta, Adam Aigner-Treworgy, Dana Bash, Peter Hamby, Candy Crowley, John King, Mark Preston, John Helton, Jason Hanna, Shawna Shepherd and Paul Steinhauser contributed to this report.