Saying that the United States must reject a path of hatred and divisiveness, he said it must “instead find the moral conviction to choose a different path, a higher path, a path of compassion, justice and love.”

“And that is the path that I call democratic socialism,” he continued.

Mr. Sanders mentioned Mr. Trump by name eight times during his remarks, once more than he said the words “democratic socialism” — mirroring the playbook of Joseph R. Biden Jr., the current Democratic front-runner, who has squarely portrayed himself as being in a direct showdown with the president. Mr. Sanders said the president “believes in corporate socialism for the rich and powerful; I believe in a democratic socialism that works for the working families of this country.”

In a pre-speech interview, Mr. Sanders said he aimed to draw the president into a one-on-one debate about his agenda.

“It’s going to provoke, I know, a fierce debate,” Mr. Sanders said. “I eagerly look forward to President Trump’s tweets.”

[Sign up for our politics newsletter and join the conversation around the 2020 presidential race.]

Yet while Mr. Sanders drew distinctions between himself and the president, he also included allusions to the contest that would precede a showdown with Mr. Trump. Ticking through a list of New Deal opponents, Mr. Sanders included “the conservative wing of F.D.R.’s own Democratic Party,” an unambiguous reference to his centrist foes in today’s Democratic Party.

Mr. Sanders delivered his remarks at a moment his campaign is flagging in early polls. A Monmouth University survey released on Wednesday, an hour before Mr. Sanders’s speech, showed that Senator Elizabeth Warren of Massachusetts had surpassed Mr. Sanders among Democratic voters in Nevada, a key early state, with 19 percent support to Mr. Sanders’s 13 percent. Mr. Biden led with 36 percent, but the results mark the first time Ms. Warren has led Mr. Sanders in a major poll of 2020 voters.

A poll over the weekend from The Des Moines Register and CNN showed that Mr. Sanders was running second but that he had lost ground over the last three months among likely Iowa caucusgoers, as Ms. Warren and Mayor Pete Buttigieg of South Bend, Ind., surged to within a point or two.