MONTGOMERY, Ala. — Rick Santorum has won Alabama's presidential primary, with Newt Gingrich running second.
With 51 percent of the precincts reporting Tuesday night, Santorum had 35 percent of the votes, Gingrich 30 percent, Mitt Romney 28 percent, and Ron Paul 5 percent.
Santorum couldn't match Gingrich and Romney in campaign spending or organization in Alabama. But exit polling he had strong appeal with white born-again Christians, who made up nearly three-fourths of the Republican primary voters.
The exit polling was based on interviews with 1,589 voters at 30 randomly selected polling places.
Romney, the faraway front-runner in the delegate chase, bristled in the hours before the votes were counted, saying Santorum was "at the desperate end of his campaign."
But Santorum declared late Tuesday as the votes were still being counted, "We're on our way to victory tonight and we're on our way to victory in this election."
It was Gingrich with the most to lose as he struggled for political survival in a part of the country he hoped would fuel one more comeback in the unpredictable race to pick an opponent to President Barack Obama.
There were 107 Republican National Convention delegates at stake, 47 in Alabama, 37 in Mississippi, 17 in Hawaii caucuses and six more in caucuses in American Samoa.
In Alabama, with 29 percent of the precincts counted, Santorum was pulling 35 percent of the vote, Gingrich had 30 percent and Romney 28 percent.
Returns from 58 percent of Mississippi's precincts showed Santorum with 33 percent, Gingrich 32 percent and Romney 30.
Each of the three leading contenders faced a different challenge in Alabama and Mississippi, where heavy television advertising was evidence of the states' unaccustomed significance deep in the nominating campaign.
Gingrich struggled for political survival, Romney sought a strong showing to silence his critics and Santorum hoped to emerge at last as the chief conservative rival to the front-runner.
Rep. Ron Paul, the fourth contender, made little effort in the states on the day's ballot.
Evangelicals played an outsized role in both primary states, underscoring the challenge to Romney. In Mississippi and Alabama, roughly four in five voters surveyed as they left their polling places said they were born again or evangelical.
Those voters have been reluctant to rally to Romney's side in the primaries and caucuses to date. He won 35 percent of their votes in Mississippi, and 27 percent in Alabama, the polling day surveys indicated. His best previous showing in a heavily contested primary this year was 38 percent in Florida.
More broadly, the exit polls showed an electorate that is conservative, determinedly Republican and profoundly unhappy about the government.
In Mississippi, more than eight in 10 voters said they were dissatisfied or angry with the federal government, while in Alabama, 80 percent said they would definitely vote for the Republican candidate against Obama next fall, no matter who he is.
While Alabama and Mississippi are among the most conservative states in the country and share a long border, the exit polls showed significant differences in the voters' reaction to the candidates.
In Mississippi, Romney had the support of 35 percent of primary voters who earn under $50,000 a year, compared with 27 percent in Alabama. He drew the backing of 38 percent of Mississippi primary voters with no college education, compared with 26 percent in Alabama.
Only about half of all voters in each state said they work fulltime for pay, and they, too, voted differently one state from the other.
Santorum outpolled Romney, 38 percent to 23 percent among that group in Alabama. But Romney prevailed in Mississippi, 35-28.
As has been true in earlier primaries, the economy was the most important issue to voters, and an ability to defeat Obama the most important quality when it came time to pick a candidate.
The exit polls were based on interviews with 1,552 voters as they left 30 randomly selected polling places around Alabama, and with 1,575 Mississippi voters from 30 sites. Each survey had a margin of sampling error of plus or minus 4 percentage points.
The Southern showdown came as new polling showed a decline in Obama's approval ratings — a reversal amid escalating gasoline prices and turbulence in the Middle East.
The day began with Romney leading the delegate competition by far in The Associated Press count, with 454 of the 1,144 needed to win the nomination. Santorum had 217, Gingrich 107 and Paul 47.
That gave the former Massachusetts governor more than his rivals combined. And while Santorum in particular challenges the mathematical projections, Romney is amassing delegates at a rate that puts him on track to clinch control of nomination before the convention next summer.
Romney, campaigning in Missouri, took exception to a television commercial airing in both Southern states and said Santorum "is at the desperate end of his campaign." The commercial was backed by a super PAC that supports the former senator, not by him.
Santorum's camp had earlier issued a memo that dismissed as fuzzy math Romney's claim that he is on track to amass a delegate majority. "Simply put, time is on our side," it said.
Gingrich's aides issued a rebuttal of their own with the polls still open in the primary states. It said the primaries were not yet half over, and the former House speaker "is well positioned to win the GOP nomination."
The large amount of television advertising was testimony to the importance the contenders and their allies attached to the primaries in both Alabama and Mississippi.
All three candidates as well as super PACs supporting each of them ran television commercials. As has been the case all year, Restore Our Future, which backs Romney, spent more than any of the others. The group put down $1.3 million for television ads in Alabama, another $900,000 in Mississippi and more for radio on Christian and other radio stations as well as thousands of pieces of mail designed to help the former Massachusetts governor.
It was only in recent days that Romney seemed to sense a chance in Alabama and Mississippi, and he responded by increasing his television ad expenditures and his plans for campaigning in the states.
Born in Michigan and a longtime resident of Massachusetts, he told one audience the two primaries were "a bit of an away game for him" and drew laughs from another when he said he hoped to go hunting with an Alabama friend "who can actually show me which end of the rifle to shoot."
He generally steered away from criticizing his Republican rivals and aimed his rhetoric instead at Obama, whose prospects in both states are as dim next fall as anywhere in the country.
Santorum campaigned against the president and Romney simultaneously as he sought the support of conservatives who have fueled his recent surge.
In Biloxi, Miss., on Monday, he ridiculed the science behind global warming. "The dangers of carbon dioxide? Tell that to a plant, how dangerous carbon dioxide is," he said.2 comments on this story
Gingrich spent part of his time pushing back against suggestions — including from his own staff — that he might drop out if he didn't notch a pair of Southern victories. His only two wins so far came in the South Carolina primary on Jan 21, and last week, when he won his political home state of Georgia.
Initial polls showed the former House speaker in a strong position in both states, but he abruptly canceled a campaign trip to Kansas in advance of the state's caucuses late last week to remain in the South.
He used a recorded telephone message from Chuck Norris, the actor and Karate champion, for a last-minute appeal to voters in Alabama.
Associated Press writers Charles Babington in St. Louis and Beth Fouhy and Philip Elliott in Montgomery, Ala., contributed to this report.