It was the second and last night of Democratic presidential debates in Miami, and sparks were flying. Here are the five big takeaways:

1. Joe Biden takes incoming fire

It was the big question: how would the former vice-president and current comfortable frontrunner fare once he finally got in front of the cameras flanked by rivals, some decades his junior?

Until Thursday night, Biden had kept public exposure to a minimum. But there was nowhere to hide under those brutal TV lights, and at the end of two hours Biden came off stage looking decidedly more worn than when he entered it.

He began sure-footedly. His opening words were “Donald Trump” – a pointed reminder that Biden’s main claim to the nomination is his conviction that he is the candidate to unseat the US president. “Donald Trump thinks Wall Street built America. Ordinary working-people Americans built America,” he said.

But then it started slipping. That carefully arranged mannequin of dependable Joe, the politician who gets the job done, the friend and deputy to Obama, started sliding.

Biden came across as diffident, tentatively raising a finger when he wanted to speak – a manner that had even the NBC News hosts baffled. He spoke most passionately about what he had done in the past, rather than what he dreamed of doing in the future.

Asked to state the one big reform he would push in his first term as president, he replied: “The first thing I would do is defeat Donald Trump.”

An older guy who doesn’t get the question, let alone answer it. At worst, Biden started to look the one thing that he must avoid to retain his frontrunner status: like a man watching the world spin beyond his control.

2. Kamala Harris seizes the day

If Biden looked rattled, he had Kamala Harris to thank. From the start of the debate , she had the feel of a politician who had fire in her belly and wind in her sails.

It’s been a while coming. Harris has struggled to articulate her vision, and has been criticized for her record as California’s former top prosecutor.

But on Thursday she turned that around, transforming her law enforcement credentials from a vulnerability into a weapon. “America does not want to witness a food fight; it wants to know how to put food on the table,” she admonished the other nine candidates on stage like naughty children as they squabbled.

Then came the one-liner that will probably go down in the annals alongside “Senator, you’re no Jack Kennedy”.

Harris already had Biden against the ropes over his recent statements about the “civility” of having worked productively in the US Senate with notorious racial segregationists. They got things done together, Biden had argued, including in opposing federal bussing of children to desegregate schools.

“I do not believe you are a racist,” Harris opened while addressing the former vice-president. You knew from the chill that crossed Biden’s face that history was in the making.

“It’s personal, it was hurtful, to hear you talk about the reputations of two US senators who built their careers on segregation,” she continued. Biden stiffened.

And then the killer lines: “There was a little girl in California who was part of the second class to integrate their public school and she was bussed to school every day. That little girl was me.”

We’ll have to wait to learn whether the exchange was the beginning of the end for Joe Biden’s presidential hopes. But we already know that this is the beginning of the beginning for Kamala Harris.

3. The great generational divide

There are exactly 40 years separating the youngest candidate on stage – Pete Buttigieg, 37, and Bernie Sanders, 77. And it showed.

Much as they tried to project their experience and strength, Biden and Sanders found it difficult to hold the line. Eric Swalwell, a congressman from California, 38, broke the taboo subject by announcing it was time to “pass the torch”. “I’m still holding on to that torch”, Biden replied.

Buttigieg alluded to the generational issue more subtly – as Buttigieg tends to do, asking viewers to “help me deliver that new generation to Washington before it’s too late”.

Quick Guide Who are the leading Democrats running for 2020? Show Joe Biden, former vice president Biden unsuccessfully ran for the nomination in 1988 and 2008, and his campaign is likely to be dogged by controversy after allegations from several women they were left feeling uncomfortable by their physical interactions with him. If successful, Biden would become the oldest person to be elected president in US history. Mike Bloomberg, former New York mayor Bloomberg has expressed concern that none of the top candidates can defeat Trump, and he aims to make up for an unusually late entry in the Democratic primary with historic spending of hundreds of millions of dollars in television ad time and an unorthodox strategy of skipping the first four states in the primary. Bloomberg has announced that his campaign will be entirely self-funded, but can this billionaire win? Amy Klobuchar, Minnesota senator On Election Night 2018, Klobuchar coasted to a third term as senator in a state Trump almost won. Next morning she was on every short list of potential presidential candidates. Supporters say her success with rural voters makes her a formidable candidate in the Rust Belt, while her calm demeanour provides a clear contrast with Trump. Bernie Sanders, Vermont senator Sanders turned a long-shot, anti-establishment bid for the presidency into a “political revolution” that energized the party’s progressive base. His political career began nearly 40 years ago, but it wasn’t until his 2016 run that Sanders became a national figure as a new generation of Democrats – and 2020 contenders – embraced his populist economic policies. Elizabeth Warren, Massachusetts senator Her sharp criticism of Wall Street and big corporations has made Warren a favorite among progressive activists, and she will campaign on a message of a rigged economic system and income inequality.

4. A good night for …

Kamala Harris, obviously.

Pete Buttigieg. The mayor of South Bend, Indiana was challenged over his handling of the recent fatal shooting in his town of a black man by a white policeman who had his body camera turned off. He weathered the storm.

Buttigieg admitted that South Bend’s police force remains disproportionally white “because I couldn’t get it done”.

He added: “I am determined to bring about a day when a white person and a black person driving a vehicle feels the exact same thing when they see a policeman – a feeling of safety not fear.”

Gun violence as a debating issue. Swalwell said he would ban and then buy back every assault weapon in America; Buttigieg, leaning on his status as the only war veteran on stage, said that guns were “tearing us apart”; Harris promised to take executive action to ban the importation of assault rifles.

5. A bad night for …

Joe Biden, obviously.

Bernie Sanders, who looked as though he were stuck in the same old groove.

And the also-rans. There have been plenty of moments over these past two nights when nobody seemed to be able to remember why certain individuals were even on stage. Were they gatecrashers?

That thought came forcefully on Thursday night with the two jokers in the pack – Andrew Yang, a former tech entrepreneur, and Marianne Williamson, a bestselling author of self-help healing books (typical title: 21 Spiritual Lessons for Surrendering Your Weight Forever). What was Williamson doing talking about love being the way to defeat Trump?