Media playback is unsupported on your device Media caption The surprising thing about America's migrant past

The US House of Representatives has voted to condemn President Donald Trump after a series of attacks aimed at four congresswomen.

The symbolic resolution denounced Mr Trump's "racist comments that have legitimised fear and hatred of New Americans and people of colour".

Mr Trump had been accused of racism and xenophobia for telling the members of congress to leave the country.

The president has since tweeted: "I don't have a Racist bone in my body!"

Tuesday's debate in the Democratic-controlled chamber was a highly polarised debate, with various Republicans insisting the vote itself was a breach of decorum.

It passed by 240 votes to 187.

Four Republicans and the House's sole independent, former Republican lawmaker Justin Amash, joined all 235 Democrats to approve the resolution

The four Republicans were Texas congressman Will Hurd (the party's only African American representative), Brian Fitzpatrick (Pennsylvania), Fred Upton (Michigan) and Susan Brooks (Indiana).

Passing a resolution - which is a statement of opinion and not legally binding - criticising presidential conduct is very rare.

What sparked this?

In a series of tweets on Sunday, the president said Representatives Alexandria Ocasio-Cortez, Ilhan Omar, Ayanna Pressley and Rashida Tlaib "originally came from countries whose governments are a complete and total catastrophe" and should "go back".

Mr Trump did not explicitly name the women - all four of whom are US citizens - in his initial Twitter tirade, but the context made a clear link to the four Democratic congresswomen, who are known as The Squad.

Media playback is unsupported on your device Media caption Democratic congresswoman Rashida Tlaib: "I'm dealing with the biggest bully I've ever had to deal with"

The congresswomen dismissed the comments as a distraction on Monday, and urged people instead to focus on policies rather than the president's words.

What was said in the House?

Democrat John Lewis said that "at the highest level of government, there's no room for racism", while Republican Dan Meuser called the allegations a "ridiculous slander".

Immediately after the resolution passed, Democratic Representative Al Green of Texas filed articles of impeachment against President Trump. The Democratic leadership has refused to pursue impeachment, despite increasing calls from members of their party to do so.

Media playback is unsupported on your device Media caption What does it take to impeach a president?

Reading from his resolution, Mr Green said Mr Trump had "brought the high office of the President of the United States into contempt, ridicule, disgrace and disrepute".

Afterwards, President Trump tweeted about the vote, praising "how unified the Republican Party was" in voting against the resolution and again attacking the four women for "the horrible things they said about our country, Israel, and much more".

What did the resolution say?

The resolution "condemning President Trump's racist comments directed at Members of Congress" quoted US founding fathers and former presidents.

Immigration "has defined every stage of American history", it said, adding that "all Americans, except for the descendants of Native people and enslaved African-Americans, are immigrants or descendants of immigrants".

It also noted that patriotism is not defined by race or ethnicity, "but by devotion to the Constitutional ideals of equality, liberty, inclusion and democracy".

How significant is this?

There have been only four congressional votes to approve resolutions aimed at censuring or condemning a president, according to a 2018 report by the Congressional Research Service.

The last occasion was against William Howard Taft in 1912, when he was accused of trying to influence a disputed Senate election.

The latest resolution was brought forward by Democratic Speaker Nancy Pelosi.

"These comments from the White House are disgraceful and disgusting and these comments are racist," Ms Pelosi said in the debate.

Before the vote began, Republicans also made an extraordinary move in attempting to strike Ms Pelosi's words from the official books.

They said she had breached rules as lawmakers are not allowed to make personality-based comments against other members or officials.

Representative Emanuel Cleaver and member of the Democratic Caucus, who was presiding over the floor during this lengthy delay, abandoned the chair in frustration, banging the gavel as he left.

The Democratic-controlled chamber ultimately voted the complaint down.

More on race in the US

How did the row start?

On Friday, Ms Ocasio-Cortez, Ms Tlaib and Ms Pressley testified to a House committee about conditions in a migrant detention centre they had visited.

Democrats have widely criticised the Trump administration's approach to border control, saying they are holding migrants in inhumane conditions.

Mr Trump has defended the actions of his border agents. His administration announced a new rule to take effect on 16 July, which denies asylum to anyone who crosses the southern border without having applied for protection in "at least one third country" on their way to the US.

After their testimony, Mr Trump said conditions at the centre had had "great reviews". He then posted his series of tweets about the women and Ms Omar, and has since stood by the comments.

An opinion poll in the wake of his tweets suggested support for Mr Trump rose among Republicans by 5%, although dipped among Democrats and independent voters.