President Trump on 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, endangering the lives of American citizens and brave service members, both today and in the future.”

It was just the second veto of Trump’s presidency and Congress lacks the votes to override him.

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 has shown signs of uneasiness with Trump’s close relationship with Saudi Arabia as he tries 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.

Sen. Tim Kaine, D-Va., a member of the Senate Foreign Relations Committee, said in a statement that the veto was “part of an alarming pattern of Trump turning a blind eye to Saudi Arabia’s actions that fly in the face of American values” and accused the administration of “deference to Saudi Arabia at the expense of American security interests.”

Sen. Bernie Sanders, I-Vt., who co-sponsored the resolution in the Senate along with Sen. Mike Lee, R-Utah, tweeted: “The people of Yemen desperately need humanitarian help, not more bombs. I am disappointed, but not surprised, that Trump has rejected the bi-partisan resolution to end U.S. involvement in the horrific war in Yemen.”

The U.S. has provided billions of dollars of arms to the Saudi-led coalition fighting against Iran-backed rebels in Yemen. Members of Congress have expressed concern about the thousands of civilians killed in coalition airstrikes since the conflict began. The fighting in the Arab world’s poorest country also has left millions suffering from food and medical care shortages and has pushed the country to the brink of famine.

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

CLICK HERE TO GET THE FOX NEWS APP

House approval of the resolution came earlier this month on a 247-175 vote. The Senate vote last month was 54-46.

Trump issued his first veto last month on legislation related to immigration. Trump had declared a national emergency so he could use more money to construct a border wall. Congress voted to block the emergency declaration and Trump vetoed that measure.

The Associated Press contributed to this report.