The House of Representatives on Tuesday passed a resolution formally condemning President Donald Trump for his racist attacks on four Democratic members of Congress—a vote that largely came down on party lines after a raucous afternoon of parliamentary squabbling between Democrats and Republicans.

Just four Republicans and one independent, Rep. Justin Amash of Michigan, joined with all House Democrats in the 240-187 vote to condemn Trump’s remarks.

Sponsored by Rep. Tom Malinowski (D-N.J.), who was born in Poland, the resolution largely reads as a tribute to America’s history of immigration and the politicians who celebrated that history. On the final page it “strongly condemns President Donald Trump’s racist comments that have legitimized and increased fear and hatred of new Americans and people of color.”

House Democrats drafted the bill’s language on Monday after an intense 24 hours of back-and-forth between Trump and the Democratic lawmakers during which the president reiterated his repeated taunts for the four women to leave the country, and they appeared at a joint press conference to denounce his attacks and issue calls for impeachment.

Some Democratic lawmakers had pushed for the House to consider tougher language in response to the president’s incendiary comments. But Democratic leaders hoped that this resolution might be agreeable enough to attract some support from Republican lawmakers who criticized the president, making it a bipartisan vote.

Republicans were formally urged to vote no on the resolution by their House leadership. Roughly a dozen members of their caucus spoke out to condemn the president’s comments since Sunday—some even going so far as to label them racist—but most preferred to sidestep the content of Trump’s tweets and return to arguments that the freshman lawmakers, including Reps. Alexandria Ocasio-Cortez (D-NY) and Ilhan Omar (D-MN), hold socialist and anti-Semitic positions.

On Tuesday afternoon, the GOP lodged parliamentary complaints with the resolution, arguing Speaker Nancy Pelosi violated House rules of decorum by simply reading the title of the legislation, which called the president’s tweets racist.