By Samual Chamberlin, Fox News–

President Trump Tuesday vetoed a joint resolution calling on the U.S. to end military assistance to Saudi-led forces fighting in Yemen’s ongoing civil war, calling it “an unnecessary, dangerous attempt to weaken my constitutional authorities.”

It was just the second veto of Trump’s presidency.

Both houses of Congress had invoked the War Powers Resolution of 1973 in a bid to end American involvement in the conflict, which has raged in the Middle Eastern country since 2015. Congress lacks the votes to override Trump’s veto.

Congress has shown signs of uneasiness with Trump’s close relationship with Saudi Arabia as he tries further to isolate Iran, a regional rival. Many lawmakers also criticized the president for not condemning Saudi Arabia for the killing of Saudi writer Jamal Khashoggi, who had been critical of the kingdom.

After the Senate passed the resolution last month, the White House argued that it was flawed and would undermine the fight against extremism. The Trump administration also argued that U.S. activities in support of Saudi forces did not constitute “hostilities” and claimed the resolution could “establish bad precedent for future legislation.”

Approaching its fifth year, the war in Yemen has killed thousands and left millions on the brink of starvation, creating what the United Nations called the world’s worst humanitarian crisis.

The Associated Press contributed to this report.