Candidates including Hillary Clinton and Bernie Sanders took on gun control, Benghazi and other big issues at the first Democratic presidential debate of the 2016 race. Here are the highlights. (Sarah Parnass/The Washington Post)

Hillary Rodham Clinton and Bernie Sanders clashed here Tuesday night over national security, the economy, big banks and gun-control policy in a spirited but largely civil debate that underscored competing approaches to helping the middle class and leading the country.

Clinton and Sanders, the two leading candidates for the Democratic presidential nomination, have generally avoided direct engagement along the campaign trail. But in their first face-to-face encounter, they were quick to challenge each other with surprisingly sharp and pointed language.

Early in the debate, Clinton seized on Sanders’s record on gun control, arguing that he had not been strong enough in standing up to the National Rifle Association. She also upbraided the independent senator from Vermont, who describes himself as a democratic socialist and who favors a series of big government programs, as unrealistic.

“I’m a progressive who likes to get things done,” she said.

Sanders fired back at Clinton over the use of military force, calling her proposal for a no-fly zone in Syria a bad idea and pointing out that she had supported the Iraq war with her vote in 2002. Sanders described the invasion as “the worst foreign policy blunder in the history of the country.”

Democratic presidential candidate Bernie Sanders responded to a question about Hillary Clinton's e-mails. (CNN)

But one of the highlights of the evening was the moment Sanders and Clinton found common ground over the controversy surrounding her use of a private
e-mail server while she was secretary of state, an issue that has dogged her candidacy for months and that has driven down her personal ratings.

When Clinton said she was prepared to answer all questions about the issue but preferred to talk about the problems of the American people, Sanders came to her defense. “I think the secretary is right, and that is that the American people are sick and tired of hearing about your damn e-mails,” he said.

“Me too, me too,” Clinton said, grinning broadly. As the audience cheered, she reached out to shake hands with her rival.

Clinton and Sanders were at the center of attention on the stage in Las Vegas, but three other candidates — former Maryland governor Martin O’Malley, former senator Jim Webb of Virginia, and former Rhode Island senator and governor Lincoln Chafee — sought to intrude, looking to give their lagging campaigns a boost before the biggest national audience they’ve had all year.

O’Malley, who has been sharply critical of Clinton in his campaign speeches, was restrained Tuesday as he tried to highlight his record on criminal justice, immigration and other issues. Webb said his military background makes him the most qualified to be commander in chief, and Chafee called himself a “block of granite” on issues, despite changing parties.

The debate was considered a make-or-break opportunity for the low-polling O’Malley, who has struggled to make good on what had appeared to be a promising position as an accomplished and telegenic executive. He appeared assured and smooth Tuesday, as he turned many questions to his own experience as a governor and big-city mayor in Baltimore, and was by far the most commanding of the three lesser-known candidates.

The first Democratic debate provided a marked contrast to those held so far for the Republican candidates. The GOP events have been dominated by personal attacks, one-liners and sniping over what front-runner Donald Trump has said about many of his rivals.

The Democrats’ differences were focused largely on issues and policies, though there was far more engagement than some had predicted. The debate included discussions about climate change and renewable energy, college affordability, prescription drugs, terrorism and civil liberties, and the most serious threats to U.S. security in a world awash in conflicts.

Clinton showed why she remains the favorite for the Democratic nomination. Despite criticism from her opponents and questions about whether she’s prepared to say anything to get elected, she never appeared rattled or surprised by what came at her.

Sanders, who arrived facing questions about whether he is electable in a general election, kept his focus on the issues — from universal health care to free college and the rebuilding of the nation’s infrastructure — that have fueled his surprising rise and generated enthusiasm and big crowds around the country.

Throughout the debate, Clinton and Sanders hewed closely to the main themes of their campaign. Sanders decried wealth and income inequality and the role “millionaires and billionaires” now play in funding the political process.

“What democratic socialism is about is saying that it is immoral and wrong that the top one-tenth of 1 percent in this country . . . own almost as much wealth as the bottom 90 percent. That it is wrong.”

Clinton emphasized her commitment to middle-class families. “At the center of my campaign is how we’re going to raise wages. Yes, of course, raise the minimum wage, but we have to do so much more, including finding ways so that companies share profits with the workers who helped to make them.”

The debate came during a fluid period in the Democratic race, with Clinton seeking to rebalance her candidacy after months of problems triggered by the e-mail controversy and by the continued rise of Sanders as a more serious challenger than her campaign anticipated.

Adding to the uncertainty surrounding the debate was the question of whether Vice President Biden will decide to join the race. Biden has been mulling a campaign for weeks, weighing whether he and his family are emotionally ready for a presidential run after the death of his son Beau Biden several months ago. With filing deadlines in some states nearing within the next month, Biden is running out of time to make a decision. Clinton’s performance in the debate could complicate the vice president’s decision-making.

Tuesday’s encounter was actually two debates in one. The first pitted Clinton against herself, a front-runner trying to meet the expectations set for her months ago as the overwhelming favorite to win the nomination and hoping to show nervous Democrats that she remains their best hope to maintain their hold on the White House next year.

The second dynamic was the field against Clinton, as all four of her rivals looked to gain some advantage and attention by jousting with the perceived front-runner, although they were not shy from pointing out differences with Sanders when the opportunities arose.

The first two questions from moderator Anderson Cooper of CNN focused on two of the largest perceived vulnerabilities for Clinton and Sanders. Asked about her history of shifting positions and whether she would “say anything to get elected,” Clinton turned the question back to her biography.

“I have been very consistent over the course of my entire life. I have always fought for the same values and principles,” Clinton said. “But like most human beings, including those of us who run for office, I do absorb new information. I do look at what’s happening in the world.”

The issue of whether Clinton has flip-flopped arose later on both the Trans-Pacific Partnership trade pact and the Keystone XL pipeline. She defended her shift from calling the trade deal “the gold standard” as secretary of state to opposing it last week, saying the final agreement didn’t meet her tests for job protection. On the pipeline, she said, “I never took a position on Keystone until I took a position on Keystone.”

Asked how a politician who identifies himself as a socialist of any stripe can be elected, Sanders said the challenge is to show the moral compass of what he calls democratic socialism.

He recommended the semi-socialist models of Sweden, Norway and Denmark, which have national health care and paid family leave.

On Iraq, both Chafee and Sanders criticized Clinton’s judgment in voting to approve military force in Iraq in 2002, the issue that more than any other derailed her 2008 bid for the nomination.

“I did my homework” about weapons of mass destruction, Chafee said, suggesting that Clinton had not. “That’s an indication of how someone will perform in the future, and that’s what’s important.”

Clinton parried by noting that President Obama invited her to become the country’s top diplomat once he had won. “He valued my judgment, and I spent a lot of time in the situation room going over some very difficult issues,” Clinton said.

Clinton and Sanders clashed over her proposal for a no-fly zone in Syria, which Sanders said could have unintended consequences.

On guns, Sanders found himself on the defensive from both Clinton and O’Malley. He sought to point out areas where he supported more restrictions on guns and defended a vote to provide immunity to gun manufacturers, saying it had been a “large and complicated bill.”

Asked whether Sanders was tough enough on guns, Clinton said, “No, not at all.” She criticized his votes against Brady Act to restrict gun use and on the issue of immunity said, “I was in the Senate at the same time. It wasn’t that complicated to me.”

The candidates differed sharply over the balance between civil liberties and national security, with Clinton saying she does not regret her vote in favor of the USA Patriot Act and Sanders saying he made the right call in voting against it.

“It was necessary to make sure that we were able after 9/11 to put in place the security that was needed,” Clinton said, but she accused the Bush administration of stretching its surveillance powers too far.

Sanders said he would shut down the National Security Agency surveillance program because “virtually every telephone call in this country ends up in a file at the NSA,” adding: “That is unacceptable to me.”

Tuesday’s encounter was the first of six scheduled Democratic debates that will be held between now and early March. The next Democratic debate will be held Nov. 14 in Iowa.