The United States House of Representatives on Tuesday night passed a resolution condemning President Donald Trump’s tweets targeting four Democratic Congresswomen of colour, The Guardian reported.

The measure was the first House rebuke of a president in more than 100 years, according to The New York Times. It was approved on a mostly partisan-line vote of 240 to 187. Four Republicans – Will Hurd of Texas, Brian Fitzpatrick of Pennsylvania, Fred Upton of Michigan, and Susan Brooks of Indiana, and the House’s lone independent, Representative Justin Amash of Michigan – voted with Democrats to condemn the president.

However, Trump strongly denied the accusations of racism. “Those tweets were not racist,” he tweet. “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. This should be a vote on the filthy language, statements and lies told by the Democrat Congresswomen, who I truly believe, based on their actions, hate our country.”

Before the vote on the resolution, Speaker Nancy Pelosi of the Democratic Party said every member of the House should condemn the racist tweets. “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,” she added.

Senate majority leader Mitch McConnell defended the president and said he was not racist. “Everyone ought to tone down their rhetoric, and we ought to move back to talking about the issues,” he told reporters at Capitol Hill.

Republican Congressman Kevin McCarthy said the House resolution was simply a way for Democrats to attack a president they do not like.

But Republican Senator Lisa Murkowski said in a tweet that there was “no excuse for the president’s spiteful comments – they were absolutely unacceptable and this needs to stop”. She said there were enough challenges addressing the humanitarian crises at US borders and around the world. “Instead of digging deeper into the mud with personal, vindictive insults – we must demand a higher standard of decorum and decency,” she added.

Although Trump did not mention any names in his tweets on Sunday, most reports claimed that he was referring to Alexandria Ocasio-Cortez, Rashida Tlaib, Ayanna Pressley and Ilhan Omar. He asked the four to “go back and help fix the totally broken and crime infested places from which they came”. Ocasio-Cortez, Tlaib and Pressly were born in the United States while Omar moved to the country from Somalia in her childhood. All four were elected to US Congress in 2018.