Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The department charged with enforcing President Donald Trump’s refugee ban sought to clarify the executive order on Sunday night amid a whirlwind of protests, legal challenges and confusion over whether the two day-old policy applies to permanent U.S. residents.

In a statement, the Department of Homeland Security said it was complying with emergency court rulings issued earlier that temporarily halted parts of the order.

"We are committed to ensuring that all individuals affected by the executive orders, including those affected by the court orders, are being provided all rights afforded under the law," the statement said.

The statement added that the department was working with airlines to prevent more people from flying to the U.S. who are covered by the order, which temporarily bans refugees seeking asylum and people from seven predominantly Muslim countries from entering the U.S.

The policy also indefinitely bans Syrian refugees.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: Trump Defends Immigration Ban Amid Uncertainty, Outcry

The clarification came after an unclear number of people who had been approved to enter the U.S., including an Iraqi interpreter who had worked with the American military, were detained over the weekend in airports from New York and Dallas to San Francisco and Atlanta.

Lawyers and politicians rushed to the facilities as protests erupted around them. Federal judges in New York, Washington state, Massachusetts and Virginia temporarily blocked the deportation of people who were legally authorized to enter the U.S.

As Trump defended the order, saying it was not about religion but keeping the country safe, a senior White House official and the Department of Homeland Security said it would remain unchanged — despite a court ruling from New York's Eastern District.

"Prohibited travel will remain prohibited, and the U.S. government retains its right to revoke visas at any time if required for national security or public safety," the department said in a statement.

Related: Some Republicans Criticize Trump Over Order

Adding to the confusion, White House chief of staff Reince Priebus said on Meet the Press that the order doesn’t apply to permanent residents, or green card holders — even though administration officials said initially that it did. When pressed, however, Priebus reversed himself, saying "of course" the policy affects them.

"If you're traveling back and forth, you're going to be subjected to further screening," he said.

In a separate statement on Sunday night, newly-installed Homeland Security Secretary John Kelly appeared to settle the matter, saying that without "significant derogatory information indicating a serious threat," allowing entry to green card holders was in "the national interest."

In a briefing with reporters on Sunday night, White House officials said that 170 green card exemptions had already been granted under the policy.

At least six lawsuits challenging the order had been filed in federal court and the Council on American-Islamic Relations told NBC News it planned to file a suit challenging the order Monday morning.

New York Attorney General Eric Shneiderman told MSNBC's Ari Melber that he was weighing whether New York had standing to sue the Trump administration as well.