The Senate voted 51-45 on Wednesday to advance a resolution that would limit President Trump from pursuing military action in Iran without congressional approval.

Eight Republicans sided with all Democrats to move Sen. Tim Kaine's (D-Va.) resolution forward for a floor vote. Sens. Bernie Sanders (I-Vt.), Elizabeth Warren (D-Mass.), and Amy Klobuchar (D-Minn.) didn't vote as they were likely on the presidential campaign trail, and recent 2020 dropout Sen. Michael Bennet (D-Colo.) didn't vote either.

President Trump tweeted earlier Wednesday to encourage senators to vote against the resolution, saying "this is not the time to show weakness" to Iran. He'll very likely veto the bill, and the Senate won't have the votes to overturn it.

....If my hands were tied, Iran would have a field day. Sends a very bad signal. The Democrats are only doing this as an attempt to embarrass the Republican Party. Don’t let it happen! — Donald J. Trump (@realDonaldTrump) February 12, 2020

The act came in response to escalating tensions with Iran, especially after Trump authorized a strike that killed top Iranian general Qassem Soleimani.

Editor's note: This story has been updated to reflect that senators voted to advance the resolution to a full floor vote. Kathryn Krawczyk