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.