In recent weeks, President Trump has been under renewed criticism for comments that have been condemned as racist. He told four Democratic congresswomen of color to “go back” to their home countries, echoing language long used to discriminate against people of color and deny their constitutional rights to citizenship and speech. (Three of the congresswomen were born in the United States and the fourth was naturalized as a teenager .)

Over the weekend, Mr. Trump set off a backlash after he assailed a Baltimore-based congressional district that is 53 percent African-American as a “disgusting, rat and rodent infested mess” where “no human being would want to live.”

A poll conducted this month by Quinnipiac University found that half of voters believe Mr. Trump is racist, but voters are sharply divided along partisan lines. When separated by party, 86 percent of Democratic voters classified Mr. Trump as racist, while 91 percent of Republicans said he was not.

Race is expected to be a key issue in the 2020 election, as Democratic candidates seek to prove they can help America bridge its racial divide.

From the beginning, the American presidency has been stained by racial prejudice, often a reflection of broader sentiment among white citizens. Such views have persisted well into modern times.

“If you dig deep enough you’ll find something like this in probably most presidents of the 20th century,” said Jelani Cobb, a professor of journalism at Columbia University and former director of the Africana Studies Institute at the University of Connecticut, who frequently writes on race, politics, history and culture.

George Washington owned slaves and wrote that “most” were lazy when unsupervised, though he later freed his slaves in his will. Theodore Roosevelt dismissed “Negroes” as a “perfectly stupid race,” while Woodrow Wilson and Dwight D. Eisenhower frequently espoused prejudiced views and told racist jokes. Lyndon B. Johnson, sometimes hailed as a civil rights hero, espoused racist views, often referring to African-Americans using slurs .