US President Donald Trump’s comparison of the impeachment inquiry being conducted against him to a “lynching” sparked a heated backlash on Tuesday.

Stirring painful memories of America’s racist past, Mr Trump tweeted in regard to the investigation into his dealings with Ukraine: “All Republicans must remember what they are witnessing here – a lynching. But we will WIN!”

The comparison to lynching – a practice once widespread across the southern US in which angry mobs killed thousands of black people – triggered an outcry from Democratic politicians and condemnation from outside of Washington, but also some agreement from the president’s Republican allies.

A woman whose father was killed by Ku Klux Klansmen in Alabama in 1957 called the comment “unbelievable”.

Mr Trump has spent recent days pressuring Republicans to give him stronger support in countering the impeachment investigation.

His controversial tweet came a day after he said the GOP needed to “get tougher and fight” against the fast-moving inquiry into whether he tried to withhold US military aid until Ukraine’s government agreed to investigate Democrat Joe Biden and his son.

The White House insisted later on Tuesday that Mr Trump was not comparing impeachment to “one of the darkest moments in American history”.

Spokesman Hogan Gidley said Mr Trump sent the tweet to point out what he felts was his continued mistreatment by the news media.

Mr Trump, who has complained about unfairness in the impeachment process being led by House Democrats began his tweet: “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.”

It was the latest instance in which Mr Trump has tried to advance his political interests by unleashing racially inflammatory language.

Over the summer, he told four Democratic congresswomen of colour to go back to their “broken and crime-infested” countries, although the four are US citizens.

Earlier in his presidency, Mr Trump unleashed a firestorm by saying there were “very fine people” on both sides of a 2017 white supremacist rally and counter-protest in Charlottesville, Virginia, that resulted in the death of an anti-racism demonstrator.

The reference to a lynching struck a deep, painful chord for black people whose relatives died in racially motivated killings.

Malinda Edwards, whose father was forced to jump off an Alabama river bridge in 1957 by Klansmen who heard that he had smiled at a white woman, said Mr Trump was making light of the horror experienced by victims.

“Either he’s very ignorant or very insensitive or very racist and just doesn’t care,” Edwards, 66, of Dayton, Ohio, said of the president.

Ms Edwards’s father’s name is among those on a memorial in Montgomery, Alabama, honouring more than 4,000 lynching victims.

Janet Langhart Cohen said Mr Trump was among too many whites who had disrespected lynching victims and their descendants. Her distant cousin, Jimmy Gillenwaters, was lynched in Kentucky in the early 1900s.

Mr Trump “knows what he’s doing. He knows how to hurt and divide,” Cohen, the wife of former Republican Senator William Cohen of Maine, said.

Bernice King, a daughter of the Reverend Martin Luther King Jr., tweeted that Mr Trump’s comparison “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”.

Former Maryland Lieutenant Governor Michael Steele, a black Republican, went a step further by tweeting a graphic black-and-white photo of a black man hanging from a tree and said: “This is a lynching. Trump this is not happening to you and it’s pathetic that you act like you’re such a victim.”

Mr Trump’s closest Republican backers in Congress agreed with him, though others rejected his comparison.

“This is a lynching in every sense,” said Senator Lindsey Graham.

But Senate Majority Leader Mitch McConnell criticised Trump’s “unfortunate choice of words,” saying it would have been better to describe the impeachment process as “unfair.”

Democrats expressed outrage that Mr Trump would equate impeachment to a lynching and called on him to delete the tweet or apologise.

“That is one word no president ought to apply to himself,” said Democratic Representative James Clyburn of South Carolina, the highest-ranking African American in Congress. “That is a word that we ought to be very, very careful about using.”

Rep. Bobby Rush, who is also black, tweeted to Mr Trump: “What the hell is wrong with you?

“Do you know how many people who look like me have been lynched, since the inception of this country, by people who look like you. Delete this tweet.”

Alabama Democrat Senator Doug Jones tweeted to Mr Trump: “No sir! No, @realDonaldTrump: this is NOT a lynching, and shame on you for invoking such a horrific act that was used as a weapon to terrorize and murder African Americans.”

The Congressional Black Caucus encouraged the president to visit the National Memorial for Peace and Justice in Montgomery, also known as the “Lynching Museum.”