ATLANTA — The top candidates for the Democratic presidential nomination largely sought to speak directly to the American people rather than to draw contrasts with one another Wednesday night, in a wide-ranging presidential debate that came at a critical point in the party’s nominating contest.

For much of the debate, the candidates shied from the biting exchanges and intraparty contrasts that marked the first four gatherings, opening new lines of conversation on issues as disparate as racial justice, marijuana policy and child care. But there were also pointed if brief disputes as the night wore on, some of them focused on black voters, a key Democratic constituency.

The fifth Democratic primary debate, sponsored by The Washington Post and MSNBC, was the first since South Bend, Ind., Mayor Pete Buttigieg showed signs of surging in several polls, and Sen. Kamala D. Harris (Calif.) obliquely criticized him for his lack of support among black voters.

“For too long candidates, I think, have taken for granted constituencies that have been the backbone of the Democratic Party,” Harris said. “They show up when it’s close to election time, show up at a black church.”

She urged the party to do more to rebuild the Obama coalition.

“I completely agree,” Buttigieg said. “I welcome the challenge of connecting with black voters who don’t know me.”

Sen. Cory Booker (N.J.) criticized former vice president Joe Biden in blunt terms, attempting to peel away the black voters who have been the backbone of Biden’s support.

“Black voters are pissed off, and they’re worried,” Booker said. “I have a lot of respect for the vice president … But this week I heard him literally say that ‘I don’t think we should legalize marijuana.”

Looking toward Biden, Booker said, “I thought you might have been high when you said it.”

Biden said that marijuana should be decriminalized but that its long-term effects need to be further studied before it was fully legalized.

“I come out of the black community in terms of my support,” Biden said. “They know me.”

Biden also claimed to have the support of “the only black African American woman had ever been elected to the United States Senate.” It was an apparent reference to an endorsement from former senator Carol Moseley Braun (Ill.), but disregarded Harris — who, onstage, laughed and shrugged.

The debate came with less than three months remaining before the voting begins in Iowa, and as the field is growing both larger and more fluid. It also came after a convulsive day in Washington, with riveting testimony in Washington’s impeachment hearings extending to just before the candidates took the stage. The event began only hours after U.S. Ambassador to the European Union Gordon Sondland told the committee he believed the president used the power of the Oval Office for his own political gain.

Trump has denied wrongdoing and has disparaged several of the witnesses testifying in the probe. Five of the 10 presidential candidates who appeared on the stage are U.S. senators who may ultimately have to decide whether to convict Trump during a trial that could coincide with voting in the early nominating contests next year.

“The president felt free to break the law again and again and again,” said Sen. Elizabeth Warren (D-Mass.). “We have to establish the principle: No one is above the law. We have a constitutional obligation, and we need to meet it.”

“We have a criminal living in the White House,” Harris said.

Biden chided his party for the chants that have been breaking out at some Democratic events where attendees have been shouting “Lock him up!” — a reference to Trump that echoed the line about Hillary Clinton that Trump supporters rallied around during the 2016 campaign.

“I don’t think it’s a good idea that we mock that — that we that we model ourselves after Trump and say, ‘Lock him up,’” Biden said. “Look, we have to bring this country together. Let’s start talking civilly to people and treating — you know, the next president starts tweeting … anyway,” he said, trailing off.

“Look, it’s about civility,” he continued. “And that’s not who we are. That’s not who we’ve been. That’s not who we should be. Follow the law.”

Biden said emphatically that he would not order his Justice Department to prosecute Trump, but he held out the possibility that it could do so if the attorney general he appointed thought it was warranted.

Sen. Amy Klobuchar (Minn.), in an aggressive debate performance, pointedly stood by her recent comments about a double standard harming the female candidates. She had said that if a woman had the same résumé as Buttigieg — mayor of a midsize city — she would likely not be on the presidential debate stage.

“What I said was true. Women are held to a higher standard,” Klobuchar said. “Otherwise, we could play a game called Name Your Favorite Woman President, and which we can’t do because it has all been men.”

She later dismissively referred to him as a “local official.”

While impeachment is a unifying topic for Democrats, the presidential race has showcased the party’s internal struggle over how much of the campaign should revolve around Trump’s fate, versus maintaining the issue-heavy focus that led the party’s 2018 House candidates to a majority. Within the policy field is a separate Democratic fight, over whether to pursue the sweeping policy changes backed by its liberal wing or embrace a more-moderate vision for bringing the country together after Trump.

“We cannot simply be consumed by Donald Trump,” Sen. Bernie Sanders (I-Vt.) said. “If we are, you know what? We’re going to lose the election.”

For the fifth debate in a row health care was a prominent topic, with the party still grappling over whether it should continue to defend the Affordable Care Act passed under President Barack Obama or aim for a more far-reaching program that would again upend the health-care system.

It has become one of the most vigorously fought topics, with Warren and Sanders proposing a Medicare-for-all plan that would abolish private insurance and place all Americans under a government-run system.

Warren, who has released two new parts of her health plan since the last debate, spoke briefly about her new approach to ­government-run health care, which would open the Medicare program to all Americans before trying to force them. “When people have had a chance to feel it, taste it and live with it, we’re going to vote,” she said, and the country will approve, she predicted.

Sanders chimed in that he “wrote the damn bill” and stressed that he would push for a compulsory government-run health-care system in his first week in office. “The current health-care system is not only cruel, it is dysfunctional,” Sanders said.

But the more-moderate candidates onstage also defended their approaches. Buttigieg said that Americans would not like to be told what to do. “Commanding people” to go into Medicare, he said, “is not the right approach to unify the American people.”

Biden used skepticism of Medicare-for-all on the part of House Speaker Nancy Pelosi (D-Calif.) to bolster his own plan.

“Nancy Pelosi is one of those people who doesn’t think it make sense,” he said. “We should build on Obamacare.”

Pelosi’s name was cited several times during the debate, a testament to her emergence as a revered party figure.

“If you think a woman can’t beat Trump,” Klobuchar said. “Nancy Pelosi does it every day.”

Buttigieg has emerged as a clear primary front-runner in some states, with a recent poll putting him ahead of the pack in first-to-vote Iowa. His opponents began sharpening their attacks on him before the debate even started, with some questioning his experience as a small-town mayor and others challenging him directly over his handling of racial issues.

Buttigieg came into the debate fresh from a controversy in which his campaign touted the backing of more than 400 South Carolinians for his “Douglass Plan for Black Americans,” even if they did not endorse Buttigieg himself. That led some signatories to feel their positions had been misrepresented.

It also emerged that Buttigieg’s campaign had used a stock photo of a woman and child in Kenya to promote the Douglass Plan; the campaign said the image has been removed from its website and apologized for its inclusion.

Buttigieg conceded that he has struggled to connect with black voters. He noted that he has not experienced discrimination because of the color of his skin, but said he felt some common cause with minorities because he is gay.

“I do have the experience of sometimes feeling like a stranger in my own country,” said Buttigieg. And he said he was able to watch “my rights expanded by a coalition of people like me and people not at all like me working side by side, shoulder to shoulder.”

Biden, when asked about being more sensitive to the cultural reckoning with sexual harassment and violence toward women, spoke of how he took advice from college students to “get men involved, engage the rest of the community.”

“We have to just change the culture, period,” Biden said. “And keep punching at it and punching at it and punching it.”

Some of the most personal exchanges centered on Rep. Tulsi Gabbard (D-Hawaii) and her biting criticism of the party she is running to represent.

“Our Democratic Party, unfortunately, is not the party that is of, by and for the people,” Gabbard said. “It’s a party that is a party that has been and continues to be influenced by the foreign policy establishment in Washington, represented by Hillary Clinton and others, foreign policy by the military industrial complex and other greedy corporate interests.”

Harris jumped in and ridiculed Gabbard for her harsh criticism of fellow Democrats, along with her ties with Trump administration officials and her willingness to meet with Syria President Bashar al-Assad.

There also were several moments of levity, with candidates displaying their sense of humor and a familiarity with one another.

“I raised $17,000 from ex-boyfriends,” said Klobuchar, reprising one of her standard jokes.

“I don’t talk a big game about helping the working class while helicoptering between golf courses with my name on them,” Buttigieg said in a reference to Trump. “I don’t even golf.”

When billionaire Tom Steyer was pressed on his level of political spending, entrepreneur Andrew Yang jumped to his defense.

“We have a broken campaign finance system,” he said. “You can’t knock someone for having money and spending it in the right way, in my opinion”

“Thanks, Andrew,” Steyer said with a grin.

“No problem,” he said in return.

Amy B Wang and Cleve R. Wootson Jr. contributed to this report.