CHARLESTON, S.C. (Reuters) - Democratic presidential candidates unleashed withering attacks on Bernie Sanders in a boisterous debate in South Carolina on Tuesday, assailing his ambitious economic agenda and warning his nomination would be a “catastrophe” that would cost Democrats the White House and control of Congress.

In a debate that featured candidates repeatedly shouting over one another and ignoring their time limits, Sanders’ opponents united in attacking the self-avowed democratic socialist as a risky choice to face Republican President Donald Trump in November.

“Bernie will lose to Donald Trump, and Donald Trump and the House and the Senate and some of the statehouses will all go red,” billionaire former New York Mayor Michael Bloomberg said, adding that would be “a catastrophe.”

Pete Buttigieg, the moderate former mayor of South Bend, Indiana, criticized Sanders for the shifting estimates on the costs of his proposals such as government-run healthcare and warned that the front-runner would bring about chaos.

“I can tell you exactly how it all adds up. It adds up to four more years of Donald Trump,” Buttigieg said.

“If you think the last four years has been chaotic, divisive, toxic, exhausting, imagine spending the better part of 2020 with Bernie Sanders versus Donald Trump.”

Sanders, a senator from Vermont, has taken command of the Democratic race after his resounding win last week in Nevada, and the debate was the last chance for his opponents to try to stop his momentum before Saturday’s South Carolina primary and next week’s 14 vital Super Tuesday contests.

Under incoming fire, Sanders largely held his ground. He defended healthcare as a human right and said his economic and social justice agenda, including his Medicare for All plan that would replace private health insurance with a government-run program, is supported by the American people.

“If you want to beat Trump, what you’re going to need is an unprecedented grassroots movement of black and white and Latino, Native American and Asian people who are standing up and fighting for justice. That’s what our movement is about,” Sanders said.

Slideshow ( 22 images )

Underscoring the high stakes of Tuesday’s debate, even Elizabeth Warren, a senator from Massachusetts and a progressive ally of Sanders, took a swing at her old friend.

“I think I would make a better president than Bernie. And the reason for that is that getting a progressive agenda enacted is going to be really hard,” said Warren, who is trying to revive her struggling campaign after poor showings in the first three nominating contests. “I dug in, I did the work, and then Bernie’s team trashed me.”

Senator Amy Klobuchar, who is seeking to become the moderate alternative to Sanders but so far has failed to make an impact, said neither Sanders nor Warren had shown the leadership in the Senate to accomplish much.

“It matters if you can actually get things done,” she said.

BLOOMBERG-WARREN ROUND TWO

Bloomberg, who turned in a shaky performance in his debut debate last week in Nevada, was sharper and more aggressive this time. He defended his treatment of women after Warren reprised attacks on what she said was his history of making sexist comments.

He said he complied with a request from Warren in the last debate to release three women he worked with from their non-disclosure agreements.

“The trouble is, with this senator, enough is never enough,” he said. “We did what she asked, and thank you, you’ve probably made the world better because of it.”

Slideshow ( 22 images )

Bloomberg, who has been bankrolling a massive advertising blitz, said he also spent his own money to help elect nearly two dozen Democratic House of Representatives candidates in 2018 and “put Nancy Pelosi in charge” so Congress could “control” the president.

Bloomberg also took aim at Sanders, referring to reports that U.S. intelligence officials believe Russia is trying to help Sanders in the election.

“Vladimir Putin thinks that Donald Trump should be president of the United States, and that’s why Russia is helping you get elected so you lose to him,” Bloomberg told Sanders.

Sanders shot back: “Hey Mr. Putin, if I’m president of the United States, trust me you’re not going to interfere in any more elections,” in reference to Russian President Vladimir Putin.

Sanders was criticized for his recent comments praising aspects of the late Cuban revolutionary leader Fidel Castro’s leadership, but said he opposed authoritarianism all over the world.

“When dictatorships - whether it is the Chinese or the Cubans - do something good, you acknowledge that. But you don’t have to trade love letters with them,” he said.

Sanders, who is Jewish, also drew the anger of the pro-Israel American Israel Public Affairs Committee (AIPAC) lobby group and its supporters over the weekend when he said he would skip its meeting, labeling it a platform for “bigotry.”

During the debate, he said Israeli Prime Minister Benjamin Netanyahu was “a reactionary racist.”

MAKE OR BREAK

The pressure for a strong performance was high for all of the contenders. Joe Biden, the national front-runner not so long ago, needs to win South Carolina to keep his campaign alive and said he expected to finish first on Saturday.

The former vice president has been counting on his traditional strong support from black voters, who make up about 60 percent of the Democratic electorate in the state, but the latest Reuters/Ipsos poll showed Sanders surpassing Biden in support among the critical constituency.

“I’m here to earn it. But, folks, I intend to win in South Carolina, and I will win the African-American vote here in South Carolina,” Biden said.

Billionaire activist Tom Steyer, who has spent heavily on South Carolina, is threatening Biden in the state and runs third behind Biden and Sanders in the Real Clear Politics average of state polls.

Steyer warned that the party was headed to danger with either Sanders or Bloomberg, a former Republican, on top of the ticket.

“I am scared, if we cannot pull this party together, if we go to one of those extremes, we take a terrible risk of re-electing Donald Trump.”