WASHINGTON (Sputnik) - The Senate has voted to advance legislation opposing any "precipitous withdrawal" of US forces from Syria and Afghanistan, following President Donald Trump’s announcement that he would be pulling all US troops out of the country.

The Senate voted 68-23 to limit debate on an amendment introduced by Senate Majority Leader Mitch McConnell that calls on the United States to remain in Syria and Afghanistan until all terrorist groups such as al-Qaeda and the Daesh are defeated there.

READ MORE: Turkey Slams US-Led Coalition Members for Supporting Militants in Syria's Idlib

McConnell’s move was backed by almost all Republicans in the Senate, with only three of them — John Kennedy, Mike Lee and Ted Cruz — voting against the motion to advance the amendment.

Trump is reportedly considering plans to withdraw around 7,000 of the 14,000 US troops deployed to Afghanistan after ordering the Defense Department to pull out all 2,000 US soldiers stationed in Syria.

However, Senator Bernie Sanders criticized Trump’s move and supported congressional intervention to help create a more gradual troop withdrawal plan in a statement on Thursday.

"Congress must play a role, consistent with its Constitutional authority over war, in developing a troop withdrawal plan that is coordinated with our allies, that continues to provide humanitarian aid and that supports political settlements in these countries", Sanders said.

The amendment will be introduced to a wide-ranging Senate bill on the Middle East, the "Strengthening America’s Security in the Middle East Act". The sweeping legislation must still go up for a vote in the Senate, along with the US House.

READ MORE: Kurdish Militia Blocks Aid Convoy to Syria's Hajin on US Orders — Russian MoD

If passed, the legislation would impose new sanctions against Syria, boost defense spending in the region and punish activists who call for economic boycotts of Israel to protest its policies in Palestine, among other measures.

The move marks a rare break between Senate majority Republicans and President Donald Trump who has said he plans to pull US troops out of both countries. The 68 votes in favor of the motion mean it could be re-passed with two-thirds of the 100 senators overriding any presidential veto by Trump.

READ MORE: Iranian Army Rejects Israel's Claims About Attack on Iranian Bases in Syria

On December 19, President Trump announced that the US would be withdrawing its troops from Syria over a period of several months. According to Trump, the US coalition's mission, the defeat of Daesh (ISIS)*, had been secured.

The US and NATO initially launched military operations in Afghanistan in 2001 after the 9/11 terror attack. While most of the US troops had left the country by the end of 2014, NATO launched a new mission in 2015, called Resolute Support, to provide training and assistance to Afghan security forces.

*Daesh (also known as ISIS/ISIL/IS) is a terrorist organisation banned in Russia and many other countries.

*al-Qaeda is a terrorist organisation banned in Russia and many other countries.