Bonnie and Clyde. Mulder and Scully. Fred Astaire and Ginger Rogers. On Tuesday night it was Elizabeth Warren and Bernie Sanders who, defying predictions that they would turn on each other, instead formed a leftwing tag team against the forces of moderation at the latest Democratic primary debate on Tuesday.

Warren and Sanders stood centre stage in the ornate Fox Theatre in Detroit, had the most speaking time – more than 35 minutes between them – produced the best lines of the night (with the possible exception of self-help guru and long-shot candidate Marianne Williamson) and had all the appearance of incumbents fending off pesky challengers. Barack Obama’s party this isn’t.

Indeed, this was the night the Democratic party was put on the psychiatrist’s couch, the trauma of 2016’s defeat by Donald Trump laid bare, its split personality on full display.

On healthcare, immigration, the economy, the climate crisis and nuclear weapons, the rival wings of the party collided and clashed. There were times when it felt less a healthy conversation than a bout of fractious, scrappy and surly bickering (with no Spanish spoken this time), not helped by CNN hosts eager to interrupt. The party will have to hope the divide proves less damaging than the Sanders v Hillary Clinton split in 2016.

Nothing summed up the internal tension better than the first topic, healthcare. Remarkably little was said by any candidate about Barack Obama’s signature legislative achievement, the Affordable Care Act, and remarkably few criticisms were made of the way the Trump administration has sought to gut it.

Instead, the former congressman John Delaney, the best-performing moderate, came out punching with his opening statement: “Folks, we have a choice. We can go down the road that Senator Sanders and Senator Warren want to take us, which is with bad policies like Medicare for All, free everything and impossible promises that will turn off independent voters and get Trump re-elected.”

He even summoned the ghosts of George McGovern, Walter Mondale and Michael Dukakis, idealistic Democrats who were soundly beaten.

It was a red rag to a bull. Forget the speculation that the septuagenarian Warren and Sanders would fight a turf war. After they emerged on stage with handshakes and pats on the back, this diatribe from Delaney all but guaranteed the old friends would join forces.

Warren’s opening statement was a devastating riposte: “We’re not going to solve the urgent problems that we face with small ideas and spinelessness. We’re going to solve them by being the Democratic party of big structural change. We need to be the party that fights for our democracy and our economy to work for everyone.”

In the early skirmishes, she added: “We are the Democrats. We are not about taking healthcare away from anyone. That is what the Republicans are trying to do. We should stop using Republican talking points to attack each other.”

Being seen as the man who uses Republican talking points is not a place Delaney wants to be.

Later, another moderate, the congressman Tim Ryan of Ohio, tried his arm. He told Sanders he could not be certain that Medicare for All would lower costs for elderly people. “You don’t know that,” Ryan said. Sanders shot back: “I do know it. I wrote the damn bill.”

Indeed, the shouty senator from Vermont was a meme machine. Along with the line, there was video of him drinking from a CNN mug and, when invited by John Hickenlooper to throw his hands in the air, throwing his hands in the air.

Hickenlooper argued that, with Sanders’ liberal policies, Democrats “might as well FedEx the election to Donald Trump”. Sanders retorted that polls show him beating Trump in Michigan and other states.

The Montana governor, Steve Bullock, joined the moderates’ pile-on, but Delaney remained their chief spokesman. He pressed the case for pragmatism and real solutions, not impossible promises.

Warren delivered the ultimate slapdown: “I don’t understand why anybody goes to the trouble of running for president of the United States just to say all the things we can’t do and shouldn’t fight for.”

Sanders added: “We need to have a campaign of energy, excitement and of vision” that mobilises millions of young voters around policies such as free college and student debt forgiveness.

The exchange illustrated the Democrats’ dilemma going into 2020: “play safe” with a middle-of-the-road candidate such as Joe Biden, who will appear in the second night of debates on Wednesday and in theory will appeal to independents, or roll the dice on a progressive alternative who will energize the base, unlike Hillary Clinton in 2016?

While the squabbling continued, it was another good night for Pete Buttigieg, the South Bend mayor, 37, who somehow managed to rise above the fray (and sound fresh, where the former Texas congressman Beto O’Rourke sounded mannered).

Of the Republican attack line that paints progressive policies as “socialist”, he observed crisply: “It’s time to stop worrying about what the Republicans say. If we embrace a far-left agenda, they’ll say we’re crazy socialists. If we embrace a conservative agenda, they’ll say the same thing.”

There was plenty of Trump-bashing along the way. But the show was almost stolen by the quirky and eccentric Williamson, who got some of the biggest applause of the night. Her lines ranged from “yada yada yada” to the lyrically eloquent in response to a question about the continuing drinking water crisis in nearby Flint, Michigan. “This is part of the dark underbelly of American society,” she said.

“The racism, the bigotry, and the entire conversation that we’re having here tonight – if you think any of this wonkiness is going to deal with this dark psychic force of the collectivized hatred that this president is bringing up in this country, then I’m afraid that the Democrats are going to see some very dark days.

“We need to say it like it is … and if the Democrats don’t start saying it, why would those people feel they’re there for us? And if those people don’t feel it, they won’t vote for us, and Donald Trump will win.”

The moderates did not discover a new standard bearer with a realistic chance of winning on Tuesday night. But the sight of Warren and Sanders on form might make them cling to Biden just a little tighter.