Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The Senate voted on Thursday to back Senate Majority Leader Mitch McConnell's challenge to President Donald Trump's plans to withdraw U.S. troops from Afghanistan and Syria.

The chamber, in a 68-23 vote, advanced a nonbinding amendment proposed by McConnell, R-Ky. The amendment, which would be attached to a bill on broader U.S. policy in the Middle East, warns that a precipitous withdrawal of U.S. forces from the two countries "could allow terrorists to regroup, destabilize critical regions, and create vacuums that could be filled by Iran or Russia, to the detriment of the United States interests and those of our allies."

The amendment marks a rebuke of the president from McConnell, a frequent defender of Trump's policies who rarely breaks publicly with him.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Last month, Trump abruptly announced a decision to withdraw American troops from Syria, and declared victory over ISIS — a move that drew a bipartisan backlash. A day later, the White House ordered the Pentagon to formulate plans for a troop withdrawal in Afghanistan. The U.S. has about 14,000 troops in Afghanistan and about 2,000 in Syria, which then-President Barack Obama first deployed in 2015.

Throughout the 35-day partial government shutdown that ended last week, McConnell backed the president’s plan for a wall on the U.S.-Mexico border. He also helped champion the GOP tax cuts that passed Congress in 2017 and unsuccessfully pushed Obamacare repeal bills in the Senate that year. But he has split with Trump on the issue of withdrawing forces from Syria and Afghanistan.

"I believe the threats remain. ISIS and al Qaeda have yet to be defeated. And American national security interests require continued commitment to our missions there," McConnell said on the Senate floor Thursday.

Earlier in the week, McConnell said on the floor that his amendment "recognizes the danger of a precipitous withdrawal from either conflict, and it highlights the need for diplomatic engagement and political solutions to the underlying conflicts in Syria and Afghanistan."

"We have seen the costs of a precipitous withdrawal before in Iraq," he said. "We know the downsides of telling the enemy they can just wait us out."

Republicans criticized Obama for what they considered a premature withdrawal of U.S. troops from Iraq in 2011, and argue that it led to the rise of ISIS.

Before Thursday's vote, Sen. Rand Paul, R-Ky., who has backed Trump's decision to withdraw, criticized the McConnell amendment.

"It is time to bring our troops home from Afghanistan and Syria," Paul said on Twitter. "It is ludicrous to call withdrawal after 17 years 'precipitous.'"