WASHINGTON — The Pentagon is considering using small teams of Special Operations forces to strike the Islamic State in Syria, one option for continuing an American military mission there despite President Trump’s order to withdraw troops from the country.The American commandos would be shifted to neighboring Iraq, where an estimated 5,000 United States forces are already deployed, and “surge” into Syria for specific raids, according to two military officials who spoke on the condition of anonymity.The strike teams are one of several options — including continued airstrikes and resupplying allied Kurdish fighters with arms and equipment — in a new strategy for Syria that the Pentagon is developing as officials follow the order Mr. Trump gave on Wednesday for a military drawdown even as it tries to maintain pressure on the Islamic State.The Pentagon will deliver the options to Mr. Trump for approval within weeks — well before Defense Secretary Jim Mattis steps down at the end of February. Mr. Mattis resigned on Thursday, in part because of Mr. Trump’s decision to overrule his senior advisers and withdraw troops from Syria.Officials at the Pentagon said the plans sought to maintain American support for the Syrian Democratic Forces, a Kurdish-led militia of Arab and Kurdish soldiers who have proved to be the most successful ground fighters against the Islamic State.But the local forces and their Western allies continue to be tested around the town of Hajin in eastern Syria, where the Islamic State is holding on to a last slice of territory. Though Mr. Trump has boasted about the Islamic State’s defeat, the militant group has for months endured airstrikes and offensives by the American-backed Syrian fighters — and has even conducted deadly counterattacks into Hajin’s surrounding districts.Under the cover of a sandstorm in October, the Islamic State nearly overran an American Special Forces team and a group of Marines outside of Hajin, wounding two American troops, a third military official said.The group tried the same tactic again in November, waiting for a sandstorm to mask its movements, and nearly captured Gharanij, a nearby town.Secretary of State Mike Pompeo called the Trump administration’s progress against the Islamic State “extraordinary.”“We’ve made the caliphate in Syria go away,” Mr. Pompeo told National Public Radio on Friday.“And we’re very proud of that,” he said.Mr. Pompeo also spoke on Friday with President Barham Salih of Iraq about continued efforts to fight the Islamic State, said Robert Palladino, a State Department spokesman.Two military officials said that the United States Central Command was planning to position a force across the border in Iraq that can return to Syria for specific missions when critical threats arise.Derek Chollet, a former assistant defense secretary in the Obama administration, said the Pentagon could “rename these guys, and call them a counterterrorism force.”The Pentagon did not comment on Friday about the options. In an earlier statement, Dana W. White, the Defense Department spokeswoman, said the American military “will continue working with our partners and allies to defeat ISIS wherever it operates.”“The campaign against ISIS is not over,” Ms. White said in the statement.In 2014, when the United States began launching airstrikes in Iraq and Syria, the Islamic State controlled an area across the two countries that roughly amounted to the size of Britain. American Special Operations forces were deployed to Syria in October 2015.By last month, the Islamic State’s territory was reduced to the small pocket around Hajin — about 1 percent of the ground it used to control.Last week, the Syrian Democratic Forces retook the center of Hajin, forcing the militants to fall back to the town’s outskirts. But the Islamic State’s remaining hold on roughly 20 miles of territory has forced Defense Department officials to cull options for keeping what is left of the international campaign against the extremists from falling apart.That will include weighing whether United States airstrikes can remain effective without American targeting guidance from the ground, and whether they would defend Kurdish forces only from the Islamic State — and not other militants.Officials are also discussing whether the Kurdish-led force can fight without the weapons, ammunition and other supplies that will end once the American military leaves. Even allowing the Syrian Kurds to keep guns and heavy weapons provided by the United States would break the Pentagon’s 2017 pledge that the arms would be reclaimed once combat ended.The decisions are being prepared over the year-end holidays and will be made in the coming weeks, officials said.In April, the Pentagon began building a rough withdrawal plan from Syria after Mr. Trump threatened to leave. At the time, Mr. Mattis and other officials convinced the president to dig in.But even that plan called for a phased departure of troops from Syria — one that would take months, not within 30 days as is now being discussed.French and British Special Operations forces are expected to remain in Syria after the American troops leave, according to one official. But their different military tactics, combined with the loss of American resupply routes for food and ammunition, are expected to encumber the mission.The British Ministry of Defense said in a statement on Thursday that “much remains to be done, and we must not lose sight of the threat” from the Islamic State.Officially, there are 2,000 American troops in Syria. It is likely, however, that hundreds more are there in a mix of support units, Special Operations Forces, mechanics and engineers. All are part of a web of bases, outposts and airfields spread across the northeastern corner of Syria, a model similar to those in Iraq and Afghanistan.