In the latest sign that some Senate Republicans may be starting to diverge from President Trump on foreign policy, senators voted 68-23 on Thursday to advance an amendment that would oppose a quick withdrawal of U.S. troops from Syria and Afghanistan.

The procedural vote needed 60 yeas, and senators voted to end debate on the amendment in bipartisan fashion.

The test vote likely means the amendment will be incorporated into the underlying Mideast policy bill, as NPR reported.

The amendment by Senate Majority Leader Mitch McConnell, R-Ky., comes after Trump called for a drawdown of troops in both of those countries. The measure says the Islamic State and al-Qaida militants still pose a serious threat to the United States, and warns that “a precipitous withdrawal” from those countries could “allow terrorists to regroup, destabilize critical regions and create vacuums that could be filled by Iran or Russia.”

McConnell’s amendment, which is nonbinding, would encourage cooperation between the White House and Congress to develop long-term strategies in both nations, “including a thorough accounting of the risks of withdrawing too hastily.”

Trump abruptly tweeted plans for a U.S. pullout from Syria in December, arguing that the Islamic State had been defeated even though his intelligence chiefs have said the group remains a threat. Trump also ordered the military to develop plans to remove up to half of the 14,000 U.S. forces in Afghanistan.

US JUDGE RULES SYRIA RESPONSIBLE FOR DEATH OF AMERICAN JOURNALIST

McConnell didn’t frame the measure as a reproach to the president. He said before the vote that: “I’ve been clear about my own views on these subjects.”

He said he believes the threats remain.

“ISIS and al-Qaida have yet to be defeated,” McConnell said. “And American national security interests require continued commitment to our missions there.”

TALIBAN ATTACK ON MILITARY BASE KILLS AT LEAST 65 IN AFGHANISTAN

Though many Democrats have argued that the U.S. should eventually withdraw from the conflicts in Syria and Afghanistan, around half of them supported McConnell’s resolution.

Democratic California Sen. Dianne Feinstein said after the vote that she believes it’s “far past due for the United States to negotiate an appropriate end” to the conflict in Afghanistan, America’s longest war in its history.

But she said she also agreed with McConnell that the “precipitous withdrawal” from either country without political resolutions would risk what troops there have already achieved. She voted in favor of the measure.

Many of the most liberal members of the Senate — including several Democrats who are eying presidential runs in 2020 — voted against the amendment.

Independent Sen. Bernie Sanders of Vermont said he thinks Trump announced the withdrawals too abruptly, but the U.S. has been in Afghanistan and Syria for too long.

CLICK HERE TO GET THE FOX NEWS APP

A vote on final passage of the amendment could come early next week. ​

​​​​​​Fox News’ Chad Pergram and The Associated Press contributed to this report.