Both of the leading Democrats probably helped themselves in their party's first debate of the 2016 presidential campaign, held in Las Vegas and carried by CNN. But Hillary Clinton, the candidate with the most to lose, may have come away having gained the most.

The longtime front-runner has been beset by controversy, falling poll numbers and a brittle relationship with the media. A bad performance before this season's first national audience would have deepened doubts about her candidacy.

At a minimum, Clinton needed to hold her own and provide as little fresh ammunition as possible to her critics. She met this standard and far exceeded it, performing more ably than in any major media appearance since her best debates and speeches in 2008. Her answers were substantive, measured and confident. But even more important, her demeanor was both relaxed and energetic. At times, she even seemed to be enjoying herself.

Her main challenger, Vermont Sen. Bernie Sanders, also had a good night. His strong views on the left bank of the American mainstream found a receptive audience in the partisan crowd. He even got applause for saying he could and would defend his philosophy by "explaining what Democratic socialism is." Questioned about his distaste for capitalism, he turned the issue to income inequality and banks "too big to fail."

Several of the "focus group" interviews conducted by news organizations found their participants liking Sanders the best of the group.

But Martin O'Malley, the former governor of Maryland who has been running a distant third to Clinton and Sanders, also had his moments of connection with the crowd. He made several appeals to environmentalists, especially on climate change. And he told a moving story of parents from Colorado who lost a child in the Aurora theater shooting and then were denied a day in court suing the gun dealer who sold 4,000 rounds of military ammunition to the shooter.

Less successful on balance were the debate's lesser-known entrants, former Virginia Sen. Jim Webb and former Rhode Island Sen. and Gov. Lincoln Chafee. The latter, a former Republican turned independent turned Democrat, had trouble finding an angle of attack against his former Senate colleagues.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.