“That is one of the greatest accomplishments of President Obama, of the Democratic Party, and of our country.”

The health law, she said, could be improved. “But to tear it up and start over again, pushing our country back into that kind of a contentious debate, I think is the wrong direction,” she said.

That prompted Mr. Sanders to cry that “no one is tearing this up.”

But Mrs. Clinton sounded the refrain: To propose an expansive new health care plan would be to jeopardize the Affordable Care Act. She even used a term for that legislation now more often heard as a pejorative from Republicans than in such a glowing context: “Obamacare.”

“The Republicans just voted last week to repeal the Affordable Care Act, and thank goodness, President Obama vetoed it and saved Obamacare for the American people,” she said, drawing a loud ovation.

But Mrs. Clinton’s praise for Mr. Obama’s health law — one of the biggest areas of contention in her own primary versus the president in 2008 — was subtle compared with how she invoked Mr. Obama when questioned about her ties to Wall Street.

Mrs. Clinton used Mr. Sanders’s attack on her for taking speaking fees and contributions from banks to drive a wedge between Mr. Sanders and Mr. Obama, perhaps more aggressively than at any point in the campaign.

“The comments that Senator Sanders has made that don’t just affect me, I can take that, but he’s criticized President Obama for taking donations from Wall Street, and President Obama has led our country out of the Great Recession,” she said. “Senator Sanders called him weak, disappointing. He even, in 2011, publicly sought someone to run in a primary against President Obama.”