– The House voted Tuesday to condemn as racist President Donald Trump's attacks against four congresswomen of color, but only after the debate over the president's language devolved into a bitterly partisan brawl that showcased deep rifts over race, ethnicity and political ideology in the age of Trump.

The measure passed nearly along party lines, 240-187, following one of the most polarizing exchanges on the House floor in recent memory. Only four Republicans and the House's lone independent, Rep. Justin Amash of Michigan, voted with all Democrats to condemn Trump.

"I know racism when I see it, I know racism when I feel it, and at the highest level of government, there's no room for racism," thundered Rep. John Lewis, D-Ga., an icon of the civil rights movement who was nearly beaten to death in Alabama in 1965.

Some Republicans were just as adamant in their defense of Trump: "What has really happened here is that the president and his supporters have been forced to endure months of allegations of racism," said Rep. Dan Meuser, R-Pa. "This ridiculous slander does a disservice to our nation."

Republicans ground the proceedings to a halt shortly before the House was preparing to vote on the nonbinding resolution, which calls Trump's tweets and verbal volleys "racist comments that have legitimized increased fear and hatred of new Americans and people of color." Republicans voted en masse against the measure, which was the Democrats' response to Trump's attacks on Reps. Alexandria Ocasio-Cortez of New York, Ilhan Omar of Minnesota, Ayanna Pressley of Massachusetts and Rashida Tlaib of Michigan, who he said should "go back" to their countries, a well-worn racist trope that he has continued to employ in the days since.

"There's no excuse for any response to those words but a swift and strong, unified condemnation," Pelosi said as the House debated the resolution. "Every single member of this institution, Democratic and Republican, should join us in condemning the president's racist tweets."

As Republicans rose to protest, Pelosi turned toward them on the House floor and picked up her speech, her voice rising as she added, "To do anything less would be a shocking rejection of our values and a shameful abdication of our oath of office to protect the American people."

Rules of decorum

Rep. Doug Collins of Georgia, the top Republican on the Judiciary Committee, made a formal objection to the remarks, charging that they had violated the House's rules of decorum, which call for lawmakers to avoid impugning the motives of their colleagues or the president. It was a stunning turn for a resolution that was drafted in response to Trump's own incendiary language.

Trump on Tuesday denied that his tweets were racist and implored House Republicans to reject the measure. He raged on Twitter against the resolution, calling it a "con game." He renewed his harsh criticism of the congresswomen.

"Those Tweets were NOT Racist," Trump wrote. "I don't have a Racist bone in my body! The so-called vote to be taken is a Democrat con game. Republicans should not show 'weakness' and fall into their trap."

Later at the White House, he did not back away from his original comment, saying of the quartet, "they can leave."

"They should love our country. They shouldn't hate our country," he continued.

The vote Tuesday evening marked a show of unity for Democrats who had been squabbling for weeks — and a test of GOP principles. But as the debate played out, the scene devolved into a spectacle. Republicans sought to turn the tables and condemn Pelosi for her remarks about Trump — which many Democrats had echoed in their own speeches before her — touching off tumult as officials scrambled to review House rules and determine how to proceed.

At one point, Rep. Emanuel Cleaver II, D-Mo., who was presiding in the House when Republicans challenged Pelosi's words, banged the gavel, rose from the marble dais, and stormed off the House floor. "We aren't ever, ever going to pass up, it seems, an opportunity to escalate, and that's what this is," Cleaver said, his voice rising in frustration. "We want to just fight."

For their part, Republicans took to the floor not to defend the president's remarks but to condemn Democrats for what they called a breach of decorum for calling Trump out.

Ultimately, it was left to Rep. Steny Hoyer, the majority leader, to recite the official ruling that Pelosi had, in fact, violated a House rule against characterizing an action as "racist." The move by Republicans to have her words stricken from the record then failed along party lines, and Pelosi was unrepentant.

"I stand by my statement," she said as she strode through the Capitol. "I'm proud of the attention being called to it, because what the president said was completely inappropriate."

The scene underscored the intensity of feeling sparked by Trump's latest comments. Republicans spent the day not so much defending the president's tweets as arguing that Democrats, particularly Ocasio-Cortez's "Squad," were no better.

'Our sisters'

At a closed-door meeting of House Democrats on Tuesday morning, Pelosi set the stage for the debate, calling the four freshman congresswomen "our sisters," and saying the insults to which Trump subjected them echo hurtful and offensive remarks he makes every day.

"So this is a resolution based in who we are as a people, as well as a recognition of the unacceptability of what his goals were," Pelosi told Democrats, according to an aide present for the private meeting who described her remarks on condition of anonymity. "This is, I hope, one where we will get Republican support. If they can't support condemning the words of the president, well, that's a message in and of itself."

A smattering of Republicans have denounced the president's performance, including Massachusetts Gov. Charlie Baker. Trump's comments "were shameful, they were racist," he told WBUR in Boston, "and they bring a tremendous amount of, sort of, disgrace to public policy and public life and I condemn them all."

But Rep. Kevin McCarthy of California, the House Republican leader and a close ally of the president's, said he would oppose the resolution, and when asked whether Trump's tweets were racist, replied flatly, "No."

McConnell: 'Tone it down'

Senate Majority Leader Mitch McConnell did say lawmakers from all ends of the political spectrum should dial back their rhetoric, saying, "everybody ought to tone it down," but he did not take issue with the president, telling reporters who asked whether his tweets were racist, "The president's not a racist."

While the vote is symbolic and nonbinding, the debate dramatized the conflict between Democrats and a president who has organized his agenda and his re-election campaign around stoking racial controversy, and casting the group of progressive stars as dangerous extremists to be feared.