CHARLESTON, W.Va. — The U.S. Senate on Thursday passed a joint resolution directing President Donald Trump to not use military action against Iran unless first receiving congressional approval.

Senators voted 55-45, with eight Republicans joining the Senate Democratic Caucus in approving the measure.

The legislation stems from President Donald Trump ordering strikes against Iran. This includes the attack last month that killed Iranian Gen. Qassem Soleimani

Sen. Shelley Moore Capito, R-W.Va., voted against the measure.

“No one — including President Trump — wants a war with Iran. Congress must authorize any deployment of forces to Iran, and I do not support such a push towards war. Iran will only be deterred from future attacks if they know that the president has the full authority to respond if they or their proxies kill Americans. If this resolution were to become law, that authority would be called into question,” she said.

Capito added she believes Iran will be less likely to attack American forces if the country’s military leaders recognize the power of the U.S. military.

“Instead of passing this war powers resolution, Congress should stand united with the Trump Administration in telling Iran that attacks against Americans will not be tolerated, and they will be met with a strong response from our military forces,” she said.

Sen. Joe Manchin, D-W.Va., said he supported the measure as a constitutional matter.

“The authority to use military force has always been the responsibility of Congress, not one individual. I take that responsibility very seriously,” he said.

Trump earlier this week asked the Senate not to approve the measure, tweeting “this is not the time to show weakness.”