Image copyright Getty Images Image caption Senator Bernie Sanders and Mrs Clinton were both thought to have performed well

There were five candidates on stage, but it was the Hillary and Bernie show. And if he emerged a star, she was the definite winner.

This was a key moment for Mrs Clinton, an opportunity to silence critics of her campaign, reassure Democrats worried about her viability after a summer of endless stories about her email server and perceptions of untrustworthiness, a time to show her passion and connect with voters on a national stage, and perhaps even convince Vice-President Joe Biden he needn't bother getting into the race.

Mrs Clinton started off with a somewhat stilted, fact-filled introduction, which was a reminder she is usually better at the prose of governing than the poetry of running.

But she warmed up steadily during the debate and delivered a series of good repartees, including when she pushed back on criticism about her 2003 vote in support of the Iraq invasion.

"Well, I recall very well being on a debate stage, I think, about 25 times with then-Senator Obama, debating this very issue. After the election, he asked me to become secretary of state," she said, deftly dismissing doubts about her judgment.

From gun control to immigration, affordable college, the war in Syria and how to keep Wall Street in check, Mrs Clinton showed great command of the issues and demonstrated with poise that she was the candidate with the most knowledge and experience in matters of national security.

Odd rivals

But her overall performance appeared even stronger because of the odd assortment of rivals she faced: less experienced candidates who also understood that gratuitous shots against a member of the Democratic family would do little to advance their own campaign and nothing to serve their common cause of keeping the White House in the hands of a Democrat.

Image copyright Getty Images Image caption Mrs Clinton faced four other contenders

She is likely to face tougher questions and scrutiny again from the media in the coming months. And if she wins the nomination, her face-off with a Republican opponent will be no holds barred.

It will be harder to maintain her cool, and there will be no "own goals'' to help her.

When she was pushed by the moderator to explain herself on the use of a private email server, she delivered a half-decent answer, and then Senator Sanders, who is running to the left of Mrs Clinton, stepped in.

"Let me say something that may not be great politics, but I think the secretary is right - and that is that the American people are sick and tired of hearing about your damn emails," said Mr Sanders in a show of unusual magnanimity in national politics.

Just like that, the email controversy was thrown off stage. But in real life, it continues.

Congress appearance

Next week, Mrs Clinton will testify in Congress in front of the Select Committee on Benghazi, about her role as Secretary of State at the time of the attack that killed four American citizens in Libya in September 2012.

But much of the focus will be on her private server.

Every month until early next year, another tranche of her emails as secretary of state will be made public by the State Department, providing more distractions from the substantive policy proposals she has been making on the campaign trail.

A senior aide said Mrs Clinton was well prepared and he expected her to do well.

But one of Mrs Clinton's problems is inconsistent performance, sometimes because of over-preparedness, sometimes because of a reflexive defensive posture.

She has faced endless questions about her likability and ability to connect with voters, questions that dogged her campaign in 2008.

Hillary Clinton

born 26 October 1947 in Chicago

graduated from Yale Law School in 1973

married Bill Clinton in 1975

1993-2001: campaigned for expanding health insurance and women's rights as first lady

elected New York senator in 2000

re-elected by wide margin in 2006

2008: failed bid for Democratic Party presidential nomination

2009-2013: secretary of state

Profile: Hillary Clinton

A polished Clinton parries Sanders in Democratic debate

An additional challenge this time has been the transition from the poised demeanour of a diplomat in chief back to the more informal tone and passion needed on a campaign trail.

If Mrs Clinton has decided to worry less about proving her warmth and focus on demonstrating her competence, it paid off, because she showed both.

So in many ways it was a draw with Mr Sanders on energy and passion, and the self-described socialist will now draw even larger crowds.

Jeff Weaver, his campaign manager, told the BBC that the debate had shown the Vermont senator was the most electable Democrat in a general election.

That's still a hard argument to make, no matter how well Mr Sanders did on stage in Las Vegas, because his positions on most issues are too far left for the general electorate and the electoral maths for winning the nomination also stands in his way.

Republican attacks

Of all the candidates on stage, Mrs Clinton was the one who directed the most attacks against Republicans, including a passionate call to arms to push back against what she implied was Republican bullying.

"We shouldn't be paralysed by the Republican refrain about big government," she said.

Image copyright Reuters Image caption Mrs Clinton faces an appearance at Congress about her performance as Secretary of State

"They don't mind having government interfere with a woman's right to chose, and to try to take down Planned Parenthood. They're fine with big government when it comes to that. I'm sick of it."

And that was Hillary Clinton's key argument of the night and the one she will continue to make throughout the coming months while she debates with her Democratic rivals with an eye on the general election: that only she can win against a Republican.

"I think I can take the fight to the Republicans because we cannot afford a Republican to succeed Barack Obama as President of the United States."

It's an argument that will resonate with her supporters and those of her rivals.