In a rebuke of President Donald Trump, the Republican-led US Senate advanced largely symbolic legislation on Thursday opposing plans for any abrupt withdrawal of troops from Syria and Afghanistan.

The Senate voted 68-23 in favor of a non-binding amendment, drafted by Republican Majority Leader Mitch McConnell saying it was the sense of the Senate that militant groups in both countries continue to pose a “serious threat” to the United States.

The procedural vote to cut off debate meant that the amendment would be added to a broader Middle East security bill likely to come up for a final Senate vote next week.

The amendment acknowledges progress against ISIS and al-Qaeda in Syria and Afghanistan but warns that “a precipitous withdrawal” without effective efforts to secure gains could destabilize the region and create a vacuum that could be filled by Iran or Russia.