President Trump’s likening of the impeachment effort against him to a “lynching’’ Tuesday sparked outcry — as it reminded Americans of a horrific chapter in their country’s history.

A lynching refers to a murder by a mob, usually involving torture and hanging, carried out without any trial.

In the US, the heinous criminal act was largely perpetrated by whites against blacks, mostly in the South, toward the end of the 19th century and through the middle of the 20th century as the country’s racial tensions raged.

Attempts over the years to compare the term to anything else have been swiftly met with vociferous protests, particularly from the nation’s African American community.

US Supreme Court Justice Clarence Thomas was criticized by some people for using the term in 1991 to describe his US Senate confirmation hearing at the time, when he was grilled about sexual misconduct allegations involving lawyer Anita Hill.

“From my standpoint as a black American, as far as I’m concerned, it is a high-tech lynching for uppity blacks who in any way deign to think for themselves, to do for themselves, to have different ideas, and it is a message that unless you kowtow to an old order, this is what will happen to you,” Thomas raged in a statement in the Senate. “You will be lynched, destroyed, caricatured by a committee of the US — US Senate — rather than hung from a tree.”

Trump’s use of the term in referring to himself immediately drew fire — even from some members of his own party.

The president tweeted, “So some day, if a Democrat becomes President and the Republicans win the House, even by a tiny margin, they can impeach the President, without due process or fairness or any legal rights. All Republicans must remember what they are witnessing here – a lynching. But we will WIN!”

US Rep. Adam Kinzinger (R-Ill.) responded in a harsh tweet, “We can all disagree on the process, and argue merits. But never should we use terms like ‘lynching’ here. The painful scourge in our history has no comparison to politics, and @realDonaldTrump should retract this immediately. May God help us to return to a better way.”

Bernice King, the daughter of slain 1960s civil rights leader Martin Luther King Jr., tweeted, “The President of the United States comparing an impeachment inquiry to a #lynching is not a ‘distraction.’ It is a reflection of the very real trajectory of our nation and the very repugnant evil of racism, which still permeates both legislation and language in the United States.”

Kristen Clarke, president of the Lawyers’ Committee for Civil Rights Under Law, a group founded at the request of President John F. Kennedy in 1963, added in a tweet, “A lynching?

“4,743 people were lynched in the US between 1882 — 1968, incl. 3,446 African Americans. Lynchings were crimes against humanity and an ugly part of our nation’s history of racial violence and brutality.

“Sickened to see Trump’s gross misappropriation of this term today.’’

Still US Sen. Lindsey Graham (R-SC) called Trump’s comparison “pretty well accurate.

“This is a lynching, in a sense. This is un-American,” he said.