The Senate voted Wednesday to dismiss a war powers resolution that would have limited President Donald Trump’s ability to conduct further attacks on Venezuela, after two Republican senators reversed course. The dismissal followed a Republican motion that produced a 50-50 deadlock, which Vice President JD Vance broke.

The outcome showed Trump’s command over parts of the Republican conference, while also highlighting the narrow margin of support within the chamber for limiting his authority in Venezuela. The resolution had been advanced earlier, after a group of Republicans joined Democrats to push the measure forward last week.

Trump put intense pressure on five Republican senators who had backed the resolution, according to the Associated Press. Two of those Republicans, Sens. Josh Hawley of Missouri and Todd Young of Indiana, flipped and opposed the legislation before the dismissal vote.

During comments in Michigan Tuesday, Trump criticized senators who had supported the measure. He said, “Here we have one of the most successful attacks ever and they find a way to be against it. It’s pretty amazing. And it’s a shame,” and he also called Sen. Rand Paul a “stone cold loser” and Sens. Lisa Murkowski and Susan Collins “disasters,” while Paul, Murkowski and Collins kept their support.

Hawley said in an explanation to reporters that Trump’s message in a phone call was that the legislation “really ties my hands.” Hawley also said he spoke with Secretary of State Marco Rubio on Monday and was told “point blank, we’re not going to do ground troops,” adding that he received assurances the administration would follow constitutional requirements if troops were deployed again to Venezuela.

Young, meanwhile, told reporters he was no longer in support of the resolution. He said he had extensive conversations with Rubio and received assurances that Rubio will appear at a public hearing before the Senate Foreign Relations Committee. Young also shared a letter from Rubio saying the president will “seek congressional authorization in advance (circumstances permitting)” if he engaged in “major military operations” in Venezuela.

Young and Hawley said their efforts were also instrumental in prompting the administration to release Wednesday a 22-page Justice Department memo laying out the legal justification for the raid on Maduro. The memo was described as heavily redacted and indicated that for now the administration had no plans to ramp up military operations in Venezuela, and it said there was “no contingency plan to engage in any substantial and sustained operation that would amount to a constitutional war,” according to the Associated Press.

Democratic leaders argued the procedural fight reflected concerns about the administration’s conduct and legal justification. After the vote, Senate Democratic leader Chuck Schumer said, “What happened tonight is a roadmap to another endless war.”

Senate Majority Leader John Thune, in contrast, argued that the Senate was debating something the administration said was not currently underway. He said on the floor, “We’re not currently conducting military operations there,” and added that Democrats were taking up the measure because their “anti-Trump hysteria knows no bounds.”

The debate was forced by Democrats after U.S. troops captured Venezuelan leader Nicolás Maduro in a surprise nighttime raid earlier this month, according to the Associated Press. The war powers resolution, even if it had cleared the Senate, was described as having virtually no chance of becoming law because it would have required Trump’s signature. Still, the vote served as a test of GOP loyalty to Trump and a signal of how much leeway some Republicans are willing to give the administration to use force abroad.

In wider foreign-policy talk, lawmakers have also been alarmed by what Trump has said about Venezuela and other international moves, including threats involving Greenland. Danish officials, after a meeting with Vance and Rubio on Wednesday, said a “fundamental disagreement” over Greenland remains, while the AP also reported that a new AP-NORC poll found more than half of U.S. adults believe Trump has “gone too far” in using the U.S. military to intervene in other countries.