MUNICH — Homeland Security Secretary John Kelly said Saturday the Trump administration is considering a new version of the executive order banning travel of citizens from seven Muslim-majority nations that would allow travelers who were already on airplanes bound for the United States into the country, but would bar those who had not yet boarded.

“The president is contemplating releasing a tighter, more streamlined version of the first E.O.,” Kelly told the Munich Security Conference. That order, issued a week into Trump’s presidency, was quickly stayed by courts, prompting the president to criticize the justice system.

“We will have this time the opportunity … of input on the rollout plan, in particular that no one’s caught in the system coming overseas to our airports,” Kelly said. “It’s a good assumption” that green-card holders will be exempt, he said, referring to legal permanent residents.

“If they’re in motion from some distant land to the United States, when they arrive, they will be allowed in,” he said. “That being said, we will have a short phase-in period to make sure that they don’t get on the airplane.”

That would spare U.S. airports some of the chaos in the days after the travel ban on citizens of seven Muslim-majority countries was imposed Jan. 27, but it might simply export the confusion to foreign airports.

Legal analysts have said a new executive order that maintains bans would not likely allay the concerns of federal judges who put the original order on hold. Even if Trump made clear his order did not apply to green-card holders, or limited it to those applying for visas, a three-judge panel with the U.S. Court of Appeals for the 9th Circuit said that would not necessarily convince them to lift their freeze.