NEW ORLEANS — At Netroots Nation, the largest annual gathering of liberal activists, the Democratic Party’s leading left-wing voices lashed out at the political centrists.

“We tried it their way and we lost to a racist extremist,” Cynthia Nixon, who is waging a primary challenge against New York Gov. Andrew Cuomo (D), said Friday. “Republicans are going to call us socialists no matter what we do, so we might as well give them the real thing.”

The conference, now in its 13th year, laid bare the division in the Democratic Party months before November’s midterm elections, pitting the hard-charging activists talking about impeachment of President Trump, socialism and abolishment of the Immigration and Customs Enforcement agency against the counsel of establishment officials who warn that such talk only energizes Republican voters.

At the gathering of more than 3,000 activists, half a dozen Democrats who are seen as likely presidential candidates — including Sens. Elizabeth Warren (Mass.), Cory Booker (N.J.) and Kamala D. Harris (Calif.) — walked the crowds through their ambitious liberal agendas and told them not to listen to doubters.

“The pundits will say it’s impossible for us to build a coalition that cuts across issues and communities – that Democrats have to choose between being the party of the white working class and the party of Black Lives Matter,” Warren said in a speech that was frequently interrupted by applause. “They will say it. Nevertheless: We will persist.”

That reference — concerning a moment Senate Majority Leader Mitch McConnell (R-Ky.) said that Warren had “persisted” in a 2017 Senate floor speech on then-attorney general-nominee Jeff Sessions even after she was ruled out of order — was commemorated on blue-and-white “PERSIST” signs, distributed to the audience by Warren’s 2018 Senate campaign.

It was a sign of what the next presidential campaign could look like.

“It’s very different from the ‘anyone but Bush’ energy you found in 2004,” said Justin Krebs, the campaign director of MoveOn. “The feeling for both 2018 and 2020 is: We don’t have to settle. There’s so much energy, and so many candidates, that being ‘better than Trump’ is just the baseline. We can do more.”

As painful debates over race, gender and immigration have escalated tensions and deepened the country’s usual partisan divisions, speakers notably addressed those issues head-on.

“The Russians know: Racism and other forms of hate have always been Americans’ Achilles’ heel, and we need to deal with that weakness,” Harris said.

She urged attendees to “speak truth” and called for the Democratic Party to be more attentive to the concerns of key parts of its base, such as black women, who were instrumental in the special-election victory of Sen. Doug Jones (D-Ala.) last year.

“The truth is that the folks who helped build the Democratic Party and have been the backbone of the Democratic Party have not always been given equal voice in the Democratic Party, and we need to deal with that,” she said.

Even as speakers rallied activists with their calls to challenge the party establishment, the at-times conflicting messages on how best to proceed underscored the dilemma Democrats face as the November midterms and the 2020 presidential race approach.

One one side were speakers such as Warren, who declared that Democrats stand for “a politics of unity” and denounced Trump for practicing a “politics that tries to pit black working people against white working people so they won’t band together.”

“This movement, this resistance, this big, blue wave that’s gathering strength all across this country — we’re not trying to fight division with division,” she said.

In remarks Friday morning, Booker, too, struck a theme of unity, telling the crowd that “we have got to be a nation that unites folks” and calling for “a more courageous empathy, a more powerful activism.”

On the other side was Nixon, who prompted cheers from the crowd with her call for progressives to help elect not just more Democrats but “better Democrats.”

“This is not a time to settle for the way things are. This is a time to fight. This year, progressives want power, not concessions,” she said, blasting a Democratic establishment that she said “tells us to stop talking about abolishing ICE because it doesn’t poll well.”

The answer from Democratic Governors Association Chairman Jay Inslee when asked about Nixon’s challenge to Cuomo highlighted the difficulty facing establishment Democrats at a time of progressive anger.

Inslee, who is the governor of Washington state, said he believes that “having vigorous primaries, in general, is good for the Democratic Party.”

But asked when primaries can hurt the party, he demurred.

“When they’re against me,” Inslee said.