NEW YORK (Reuters) - After immigration agents detained two Iraqis on Saturday at New York’s John F. Kennedy International Airport, their lawyers and two U.S. lawmakers accompanying them tried to cross into a secure area to consult with the men.

Iraqi immigrant Hameed Darwish (C) walks out of Terminal 4 with Congressman Jerrold Nadler (L) and Congresswoman Nydia Velazquez (R) after being released at John F. Kennedy International Airport in Queens, New York, U.S., January 28, 2017. REUTERS/Andrew Kelly

Border protection agents held them back, sparking a heated exchange.

“Step back! Step back!” the agents shouted.

A few minutes later, Heidi Nassauer, chief of passenger operations for U.S. Customs and Border Protection (CBP) at the airport, was called over.

U.S. Congress members Jerrold Nadler and Nydia Velazquez, both Democrats from New York, wanted clarification on whether an immigration ban issued on Friday by President Donald Trump prevented the Iraqis from consulting with attorneys.

Nassauer had no clear answer.

“We are as much in the dark as everybody else,” said the border protection official at one of the largest U.S. airports.

The tense exchange, witnessed by Reuters, was representative of the confusion at airports across the United States and others overseas after Trump abruptly halted immigration from seven majority-Muslim countries and temporarily put a stop to the entry of refugees.

The Trump administration, facing criticism over the executive order’s implementation, on Saturday it would have been “reckless” to give details to government agencies and airports more broadly in advance of launching the security measures, which it says aimed to prevent attacks from foreign groups.

But career officials in the Homeland Security and State departments told Reuters that the administration failed to appreciate the complexity of enforcing the order consistently or the need to prepare agencies and airlines.

Throughout much of Saturday, government officials and security workers were left to guess who from those countries could enter the United States legally and who could not.

The day ended with U.S. District Judge Ann Donnelly in Brooklyn issuing an emergency stay that temporarily allowed stranded travelers with valid visas to remain in the United States. The American Civil Liberties Union, which sought the stay, said it would help 100 to 200 people with visas or refugee status who found themselves detained in transit or at U.S. airports.

Across the country, more than a dozen similar petitions on behalf of individuals being held at airports had been filed by the end of Saturday, according to a Reuters review of data collected by WestLaw. By Sunday morning, federal judges in three more states - Massachusetts, Washington and Virginia - issued orders blocking authorities from deporting travelers impacted by Trump’s executive orders.

OUT OF THE LOOP

A senior administration official said Trump’s order - aimed at citizens of Iran, Iraq, Syria, Libya, Somalia, Sudan and Yemen - needed to be implemented urgently to protect Americans.

Slideshow ( 3 images )

“There’s a very strong nexus between our immigration and visa programs and terrorist plots and extremist networks inside the United States,” the official told reporters in a briefing. “It would be reckless and irresponsible to ... broadcast to the entire world the exact security measures you’re going to take.”

Key figures at the Department of Homeland Security were informed, the official said, declining to elaborate.

At the State Department, one of the main agencies dealing with visas and immigration, most officials first heard of the executive order on immigration through the media, according to two department officials.

While some offices were aware an executive order was coming, there was no official communication or consultation from the White House, they said.

“Was there any inter-agency coordination or consultation? No,” said one senior official, speaking on condition of anonymity.

Immigration enforcement is among the federal government’s most complex endeavors, involving seven agencies from the U.S. Coast Guard and CBP to the State and Justice Departments.

Two senior officials in the Department of Homeland Security said on Saturday that they had not heard of any officials in the relevant agencies - or the congressional committees and subcommittees that oversee them - who had been consulted by anyone who helped draft the president’s order.

“If the result is confusion and inconsistency, the responsibility all lies at one address,” said one of the officials, referring to the White House.

The official, like others, requested anonymity to discuss Trump’s order.

Another Homeland Security official told Reuters that the White House worked on the executive orders with “limited department participation.”

“It has been a challenge but folks are working through it,” the official said.

UNEVEN ENFORCEMENT

Affected travelers had varying experiences at different airports, according to nearly 200 accounts gathered by the American Immigration Lawyers Association (AILA).

Many holding visas told the association they were allowed into the country without a problem despite Trump’s executive order banning them.

But some lawful permanent residents – those with so-called green cards – were turned away despite guidance to airlines from the CBP that they should be allowed to travel.

At about 10 p.m. on Friday in Seattle, some eight hours after Trump signed the executive order, an Iranian with dual Canadian citizenship from Vancouver was sent back to Canada, the traveler reported to AILA. A half hour later in New York City, an Iranian arrived at JFK and entered the United States on a valid visa without any problems, according to AILA.

One of the Iraqis detained at JFK was Hameed Khalid Darweesh, a 53-year-old Kurd who had worked as a U.S. Army translator in Iraq and had been threatened there for helping the Americans.

Visas for him and his family were issued on Jan. 20, according to a lawsuit filed on behalf of Darweesh and another Iraqi, who had also worked with U.S. military. But as soon as he landed at JFK, he was detained by CBP officers and barred from contacting his attorneys.

When his attorneys, from the International Refugee Assistance Project, asked the CBP officers whom they could contact, the agents responded, “Mr. President. Call Mr. Trump,” according to the lawsuit.

Eventually, Darweesh was allowed to leave and met the lawmakers and his lawyers, clutching his passport and weeping with joy. The other Iraqi who was detained, Haider Sameer Abdulkhaleq Alshawi, was also allowed to enter the country.

On Sunday morning, seven more detainees at JFK airport were allowed to enter the United States, said ACLU immigration attorney Andre Segura. The organization knew of at least five others that remained in the custody of border protection officials, Segura told Reuters.

CONFUSION OVER GREEN CARDS

Conflicting media and government reports have caused confusion for airlines struggling to deal with the order.

CBP informed air carriers about the executive order in a conference call late on Friday, said a person familiar with the agency’s communications. CBP then sent written guidance before noon on Saturday saying that green card holders were “not included” in the ban and could continue to travel to the United States. The source said airlines were allowing travelers with green cards on flights until told otherwise.

The Trump administration official later told reporters that U.S. green card holders traveling outside the United States need to check with a U.S. consulate to see whether they can return.

“It’s being cleared on a case-by-case basis,” the official said.

On Sunday morning, the administration addressed the issue again but left questions over how green cards holders would be screened and by what agencies.

“The executive order doesn’t affect green card holders moving forward,” White House Chief of Staff Reince Priebus addressed told NBC’s “Meet the Press.” He added that they would be subjected to extra questioning by CBP agents when they tried to re-enter the United States.

A senior administration official told Reuters, however, that it had not been determined where and how those screenings would be carried out. The nature of the screening will be up to CBP or the State Department, the official said, and specific guidelines were being drafted.

“They could be screened in many different ways and in many different places,” the official said in an interview.