WASHINGTON — The gloating among jihadists and their sympathizers began last week, right after the United States shut down almost two dozen diplomatic posts across the Middle East in response to a terrorist threat.

“God is great! America is in a condition of terror and fear from Al Qaeda,” wrote one jihadist in an online forum. Another one rejoiced: “The mobilization and security precautions are costing them billions of dollars. We hope to hear more of such psychological warfare, even if there are no actual jihadi operations on the ground.”

The jihadists are not the only ones who see the new terrorist alert in a caustic light.

The Obama administration’s decision to evacuate so many diplomats on such short notice — however justified by the seriousness of the threat — has upset some of its foreign partners, who say the gesture contributes to a sense of panic and perceived weakness that plays into the hands of the United States’ enemies, and impedes their efforts to engage with people in their countries.

Some American officials have also said they believe the administration overreacted, in large part because of the political fallout from the attack last year on the diplomatic mission in Benghazi, Libya, that killed the American ambassador, J. Christopher Stevens. Since that attack, security procedures have been tightened at American diplomatic outposts across the Middle East. Those embassies are already so heavily fortified against attacks that many diplomats lament it is more and more difficult for them to do their jobs.