WASHINGTON (Reuters) - The U.S. House of Representatives voted on Tuesday to condemn President Donald Trump for “racist comments” against four minority Democratic congresswomen, a symbolic measure aimed at shaming Trump and his fellow Republicans who stood by him.

The 240-187 vote, which split mainly along party lines, was the culmination of three days of outrage sparked by a Trump tweetstorm that diverted attention from other business in Washington but had little impact on the president’s overall approval rating, according to a new Reuters/Ipsos poll. Trump is seeking re-election next year.

Trump had told the group of congresswomen on Sunday to “go back and help fix the totally broken and crime infested places from which they came.”

All four lawmakers - Alexandria Ocasio-Cortez of New York, Ilhan Omar of Minnesota, Ayanna Pressley of Massachusetts and Rashida Tlaib of Michigan - are U.S. citizens. Three were born in the United States.

Democrats, who have a majority in the House, passed the resolution on Tuesday evening, which said the House “strongly condemns President Donald Trump’s racist comments that have legitimized and increased fear and hatred of new Americans and people of color.”

Four Republicans and one independent joined the Democrats to support the measure.

The White House did not immediately comment.

In a late night Tweet, Trump said: “So great to see how unified the Republican Party was on today’s vote concerning statements I made about four Democrat Congresswomen. If you really want to see statements, look at the horrible things they said about our Country, Israel, and much more.”

Trump’s attacks on the four progressive congresswomen - known as “the squad” - have been viewed as an effort to divide Democrats, who won control of the House in 2018 and have the power to thwart his legislative agenda.

House Speaker Nancy Pelosi, who has struggled at times to work with the progressive newcomers in her caucus, staunchly defended them in the debate. After the vote, Omar held a long, animated conversation with Pelosi on the House floor and put her arm around the speaker, the top elected U.S. Democrat.

“These comments from the White House are disgraceful and disgusting and these comments are racist,” Pelosi said. “Every single member of this institution, Democratic and Republican, should join us in condemning the president’s racist tweets.”

Pelosi’s comments put the House into a two-hour limbo after Republicans argued she went too far in her comments and broke debate rules.

House Republican leader Kevin McCarthy criticized Democrats for remarks that upset the “order and decency” of the chamber, saying: “Today is the day that historians will write about.”

U.S. Reps Rashida Tlaib (D-MI), Ilhan Omar (D-MN), Alexandria Ocasio-Cortez (D-NY) and Ayanna Pressley (D-MA) hold a news conference after Democrats in the U.S. Congress moved to formally condemn President Donald Trump's attacks on the four minority congresswomen on Capitol Hill in Washington, U.S., July 15, 2019. REUTERS/Erin Scott

Some Republicans defended Trump’s tweets, like Tom McClintock of California, who said the president was commenting on the patriotism of the congresswomen, not their race.

“I wish the president were more temperate in the words he sometimes uses and I agree that the tone of his recent remarks was unnecessarily provocative. But his central point is irrefutable,” McClintock said.

Republican Representative Doug Collins of Georgia said lawmakers should be pursuing reconciliation rather than escalating attacks against Trump, condemning the “breathtaking partisanship of today’s exercise.”

Republican Senate Majority Leader Mitch McConnell told reporters that he thought “everybody ought to tone down their rhetoric.”

“The president is not a racist and I think the tone of all of this is not good for the country, but it’s coming from all different ideological points of view,” McConnell said.

REUTERS/IPSOS POLL: LITTLE POLITICAL DAMAGE

Trump has a history of what critics consider race-baiting. He led a movement that falsely claimed Barack Obama - America’s first black president - was not born in the United States, and said after a deadly, white supremacist-led rally in Charlottesville, Virginia, in 2017 that there were “very fine people on both sides” of the incident.

Trump’s approval rating plunged after the 2017 comments. But a Reuters/Ipsos poll this week showed little immediate political damage from his latest tweetstorm.

Support among Republicans increased slightly, the poll showed, while he lost support with Democrats and independents after the comments. His overall approval rating was unchanged.

At his rallies, Trump has often talked about proposals from the progressive wing of the Democratic Party, which he calls extreme, as he seeks to energize his political base ahead of the November 2020 presidential election.

Trump had warned Republican lawmakers against voting against him, and only four defied him: Will Hurd of Texas, Fred Upton of Michigan, Brian Fitzpatrick of Pennsylvania and Susan Brooks of Indiana. Independent Justin Amash of Michigan, who quit the Republican Party last week, also voted for the resolution.

“If we’re going to bring civility back to the center of our politics, we must speak out against ... inflammatory rhetoric from anyone in any party anytime it happens,” Upton said on Twitter after the vote.

Democrats have targeted the seats held by Hurd, Upton and Fitzpatrick as ones they want to “flip” in congressional elections in November 2020. Brooks said recently she would retire from Congress next year.