A group of prominent Democrats who served in recent administrations, including John Kerry and Madeleine K. Albright, have called on the courts to extend a ruling blocking crucial parts of President Trump’s travel ban, saying the White House executive order would “endanger U.S. troops” and disrupt antiterrorism efforts.

The former officials expressed their concerns on Monday to the United States Court of Appeals for the Ninth Circuit, based in San Francisco, which is considering the matter after a judge in Seattle effectively ruled that travelers from seven predominantly Muslim nations as well as vetted refugees from all nations could, for now, continue to enter the United States.

With Mr. Trump’s executive order, “we risk placing our military efforts at risk by sending an insulting message” to Iraqis working with American forces battling the Islamic State there, the legal filing to the court said. “The order will likely feed the recruitment narrative of ISIL and other extremists that portray the United States as at war with Islam,” it said, using another name for the Islamic State, also known as ISIS.

In addition to Mr. Kerry, a secretary of state under President Barack Obama, and Ms. Albright, who held the same position under President Bill Clinton, officials behind the filing included Susan E. Rice, Mr. Obama’s national security adviser, and Leon E. Panetta, who served as secretary of defense and head of the C.I.A.