A U.S. soldier waves from an armored vehicle on a road leading to Manbij, Syria, in April. (Hussein Malla/AP)

President Trump denied Friday that he was “reversing course” in Syria, despite deciding this week to leave at least 400 U.S. troops there, only two months after announcing that all American forces were coming home “now.”

Trump said he had agreed that “we can leave a small force along with others . . . whether it’s NATO troops or whoever it might be” so that the Islamic State “doesn’t start up again.”

The administration’s latest change in its military plans would keep roughly 200 troops in Kurdish-controlled areas of Syria after the bulk of the U.S. force departs. Another 200 will remain at the remote Tanf garrison in the country’s southeast.

“A lot of people like that idea,” Trump told reporters, an apparent recognition of the diplomatic and practical difficulties created by his abrupt December decision to withdraw all U.S. troops in the spring.

The Thursday announcement of a residual “peacekeeping” force once again appeared to catch U.S. military officials by surprise, as they were undertaking preparations for a full departure by the end of April under Trump’s initial withdrawal decision. The withdrawal plan had generated military concerns about a possible Islamic State resurgence, conflict with Turkey and widespread criticism from Capitol Hill.

European allies have rebuffed U.S. requests to keep their troops in Syria if American forces withdraw. France and Britain have troops on the ground as part of the U.S.-led coalition.

France offered no public response Friday to the new plan.

A British government spokesman, speaking on the condition of anonymity, said, “We look forward to further discussions with the U.S. on their plans.”

Repeating remarks by Foreign Secretary Jeremy Hunt earlier this week, the spokesman said, “There is no prospect of U.K. forces taking the place of U.S. troops after the U.S. withdrawal.”

France and Britain have never publicly revealed the size of their forces in Syria. While the U.S. military and Trump administration have referred to the U.S. force as including about 2,000 troops, the president on Friday said it was 2,500.

White House press secretary Sarah Sanders, speaking on “Fox and Friends” on Friday, said, “We’re in constant contact with our allies. At the end of the day, the president wants to bring our troops home, and he’s working towards that, and he wants to do that in a safe and peaceful way, in the best way possible to make sure that we have complete safety for our troops that are abroad.”

Russia, whose military assistance and airstrikes have helped keep Syrian President Bashar al-Assad in power, said it was watching “the evolution of the U.S. stance” with interest. “We do not understand what they are talking about,” Kremlin spokesman Dmitry Peskov said, according to the Interfax news agency. “You know they made one statement at first and adjusted it later; sometimes we hear various agencies make different statements.”

Russian Foreign Ministry spokeswoman Maria Zakharova was equally scornful. “These statements shouldn’t be trusted, no matter who makes them, because the next day different political forces will deny them,” she said at a Moscow news briefing.

Russia has proposed that Assad’s Russian- and Iranian-assisted military forces take over the eastern third of the country, which is controlled by the United States and its Syrian ally, a Kurdish-dominated force that has done most of the ground fighting against the Islamic State.

Most of the Kurdish fighters belong to the People’s Protection Units, or YPG by its Kurdish initials, which Turkey considers a terrorist organization. Turkey has objected to having the force along its border, and said it would attack it when the United States leaves.

A week ago, acting defense secretary Patrick Shanahan met with allied leaders in Germany to propose that their forces patrol a “safe zone” along Syria’s northern border with Turkey, serving as a buffer between the Turkish military and YPG forces, even as they support stabilization efforts in territory liberated from the Islamic State and continue the fight against militant remnants.

Speaking during a visit by Turkish Defense Minister Hulusi Akar to the Pentagon on Friday, Shanahan said the military mission against the Islamic State “remains unchanged.” The administration has said it would continue to attack the militants as needed from bases in Iraq and elsewhere.

“The transition that we are working towards is stabilization and to enhance the security capability of local security forces,” Shanahan said. “We’ll do that as strategic partners.”

Gen. Joseph F. Dunford Jr., chairman of the Joint Chiefs of Staff, told reporters during the same visit that he was optimistic allies would step up. “I’m confident we can maintain the campaign,” he said.

The end of the Islamic State’s self-declared caliphate would be a victory for a president who has long sought to end the counterinsurgency wars initiated by his predecessors. Speaking Friday to reporters, Trump said that “in another short period of time, like hours, you’ll be hearing, hours and days,” that the Islamic State caliphate has been “100 percent defeated.”

Military officials have said they are in the final stage of the four-year campaign against the militants, with only a small patch of territory remaining under the Islamic State’s control in southern Syria.

A week ago, Trump said he expected the victory announcement within 24 hours.

The plan for leaving 200 U.S. troops as part of a peacekeeping force near the Turkish border was first made public by Sen. Lindsey O. Graham (R-S.C.), a Trump ally who has been a vocal opponent of the president’s withdrawal plans.

Graham, like a host of fellow lawmakers and government officials, has argued that a hasty departure would allow the Islamic State to regain strength and would cede ground to Iran, which maintains forces in Syria and controls militia fighters supporting Assad.

Lawmakers have also protested what some see as the abandonment of the Syrian Kurdish fighters. The notion of walking away from a combat ally incensed military officials. Former defense secretary Jim Mattis, citing differences with Trump, resigned shortly after Trump announced the American exit.

Graham has pushed for European countries to commit to fielding a force of about 1,500 troops in Syria in exchange for a U.S. promise to leave several hundred troops. On Friday, Graham lauded the decision to maintain a small force, calling it “a brilliant decision by the president.”

It was not immediately clear whether the activities of a small remaining force would differ significantly from the U.S. mission, which has consisted mostly of advising local forces and providing air, artillery and intelligence support. While the White House described at least part of the force as “peacekeepers,” officials did not say what exactly they would do in northeastern areas, where the potential for conflict with Turkey is high, or in the south.

Officials have described the Tanf garrison, which sits in an isolated area along a highway linking Damascus to Tehran, as a bulwark against Iranian expansion in Syria. For weeks, officials including national security adviser John Bolton have suggested that base would remain open despite Trump’s plan to withdraw and military insistence that it had received no orders from Trump to stay.