Donald Trump has vetoed a trio of congressional resolutions aimed at blocking his administration from selling billions of dollars of weapons to Saudi Arabia and the United Arab Emirates.

The secretary of state, Mike Pompeo, last month cited threats from Iran as a reason to approve the $8.1bn arms sale to the two US allies in the Gulf.

Saudi Arabia is an enemy of Iran and tension has mounted between the UAE and Tehran over several issues, including the UAE’s coordination with US efforts to curb what it calls Iran’s malign activities in the region.

But Trump’s decision in May to sell the weapons in a way that would have bypassed congressional review infuriated lawmakers. In a pushback to Trump’s foreign policy, Democrats and Republicans banded together to pass resolutions to block the weapons sale.

The White House had argued that stopping the sale would send a signal that the US did not stand by its partners and allies, particularly at a time when threats against them were increasing. The arms package included thousands of precision-guided munitions, other bombs and ammunition and aircraft maintenance support.

Anger has been mounting in Congress over the Trump administration’s close ties to the Saudis, fuelled by the high civilian casualties in the Saudi-led war in Yemen – a military campaign the US is assisting – and the killing of the US-based columnist Jamal Khashoggi by Saudi agents. Trump’s decision in May to sell the weapons further inflamed the tensions.

“The president’s shameful veto tramples over the will of the bipartisan, bicameral Congress and perpetuates his administration’s involvement in the horrific conflict in Yemen, which is a stain on the conscience of the world,” the House speaker, Nancy Pelosi, said in a statement.

It did not appear that lawmakers opposed to the sale had enough votes to override Trump’s veto.

The New Jersey senator Bob Menendez, the top Democrat on the Senate foreign relations committee, led the effort, but he had support from two of Trump’s GOP allies in Congress: Lindsey Graham of South Carolina and Rand Paul of Kentucky.

Last month members of the House foreign affairs committee grilled state department officials about the sale. Its chairman, Eliot Engel, a Democrat representative of New York, said it was a “slap in the face” to Congress and accused the Trump administration of using threats from Iran as a “convenient excuse” to push through the sale.

In a statement, Engel said: “The president’s veto sends a grim message that America’s foreign policy is no longer rooted in our core values – namely a respect for human rights – and that he views Congress not as a co-equal branch of government, but an irritant to be avoided or ignored.”