A resurgent Rick Santorum swept to victory in primaries in Alabama and Mississippi Tuesday night, upending the race for the Republican presidential nomination yet again and trying to nudge Newt Gingrich toward the sidelines.

Mitt Romney was running third in both states.

"We did it again," Santorum told cheering supporters in Lafayette, La. He added, "Now is the time for conservatives to pull together" in an effort to defeat Romney, the former Massachusetts governor who still is the faraway leader in the delegate competition to pick an opponent to President Barack Obama in the fall.

In defeat, Romney issued a brief written statement congratulating the night's big winner but also saying, "I am pleased that we will be increasing our delegate count in a very substantial way after tonight." In the hours before the votes were counted, he had bristled that Santorum was "at the desperate end of his campaign."

While Romney must regroup, 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.

Appearing before supporters in Birmingham, Ala., Gingrich twice referred to remaining in the marathon contest. But he was unusually complimentary toward Santorum, a contrast to pokes at Romney. "If you're the front-runner and you keep coming in third, you're not much of a front-runner," he said.

It is rare for Alabama and Mississippi to play an important role in a Republican nominating campaign, but the 2012 race has gone on far longer than usual. Equally improbable was the decision by Santorum and Romney to campaign in the next few days in Puerto Rico, which holds a primary on Sunday.

Illinois holds its primary next Tuesday, and already Romney's super PAC was advertising there in hopes of giving him an advantage.

Evangelicals played an outsized role in both of Tuesday's primary states, underscoring the challenge Romney had faced in the Southern primaries.

In Mississippi and Alabama, 80 percent or more of voters leaving their polling places said they were born again Christians or evangelical. Those voters have been reluctant to rally to Romney's side in the primaries and caucuses to date. Among them, Santorum bested Romney by 9 points in Alabama and 4 points in Mississippi.

More broadly, the exit polls showed a primary electorate that was conservative, determinedly Republican and profoundly unhappy about the government — a combination that will keep both states in the GOP column in the fall.

There were 107 Republican National Convention delegates at stake on Tuesday, 47 in Alabama, 37 in Mississippi, 17 in Hawaii caucuses and six more in caucuses in American Samoa.

Santorum's two victories were worth at least 27 delegates. Gingrich won at least 20 and Romney at least 18. The split underscored the difficulty that Romney's rivals face in overcoming his big lead.

The partial allocation of delegates from the primary states left Romney with 472 in The Associated Press count, with 454 of the 1,144 needed to win the nomination. Santorum had 244, Gingrich 127 and Paul 47.

That gave the former Massachusetts governor more than his rivals combined. And while Santorum in particular challenges the mathematical projections, Romney still is amassing delegates at a rate that puts him on track to clinch control of nomination before the convention next summer.

In Alabama Tuesday night, with 80 percent of the precincts counted, Santorum was pulling 35 percent of the vote, Gingrich had 29 percent and Romney 28 percent.

Returns from 93 percent of Mississippi's precincts showed Santorum with 33 percent, Gingrich 31 percent and Romney 30.

Rep. Ron Paul, the fourth contender, made little effort in the states on the day's ballot.

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 30 percent of primary voters who earn under $50,000 a year, compared with 26 percent in Alabama. He drew the backing of 33 percent of Mississippi primary voters with no college education, compared with 27 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, 39 percent to 23 percent among that group in Alabama. The two men tied among that group in Mississippi.

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.

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.

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.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

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.