With a court order in hand temporarily blocking President Trump's ban on immigration and travel from seven terror-prone Mideast and African countries, two Syrian Christian families who unsuccessfully sought to enter the United States through Philadelphia last week are close to booking their return flights.

Jonathan Grode, an attorney for the families, said they had returned to Damascus, their home, but are putting final touches on their paperwork for their return to the U.S. They were among the first to arrive in Philadelphia after the Trump administration unveiled an executive order banning entry for all visa holders from Iraq, Iran, Syria, Yemen, Libya, Somalia, and Sudan.

Their visas, unlike those of many other travelers from the affected countries, were revoked by Customs and Border Protection officials in Philadelphia, meaning they had to be reissued, a ticklish and time-consuming problem for the families, who first started their immigration process in 2003.

While there might be a digital record showing that their visas now are valid, the only paperwork they have says their travel rights have been revoked.

"We are very close to finalizing things," said Grode, managing partner of the Philadelphia office of Green and Spiegel L.L.P., an immigration law firm. "The problem we have with our clients is they have gotten the short end of the stick because they showed up at the airport and their visas were physically revoked. When there is contradictory information between travel documents, [the airline] is going to take the safest route."

Trump's Jan. 27 executive order initially barred most visa holders from the seven countries from entering the United States for 90 days -- even those with legal permanent resident status who had been residing in the U.S. for some time, who were traveling and sought to regain entry. The order also halted all refugee admissions for 120 days. The administration said it needed time to study screening procedures and to determine whether information provided by foreign governments about their citizens was adequate for security checks.

"This review is needed to ensure that individuals seeking to enter the U.S are who they claim to be and do not pose a security or public safety threat," the Department of Homeland Security said in a statement.

In a separate statement, the Customs and Border Protection Service said on Saturday it would comply with judicial orders, but left no doubt as to its view that the original executive order is lawful.

"No foreign national in a foreign land, without ties to the United States, has any unfettered right to demand entry into the United States or to demand immigration benefits in the United States," it said in a statement.

After the order was issued, opponents quickly went to court and won temporary restraining orders in New York and Boston barring the government from implementing the program while both sides presented evidence. On Friday, a federal judge in Boston gave the go-ahead for the government to resume the visa blockade, at least as it applied to the Boston plaintiffs. But then a federal judge in Seattle issued a nationwide restraining order, forcing the Department of Homeland Security to announce Saturday that it would no longer block visa holders while the matter is being litigated.

The Justice Department on Saturday appealed that decision to the U.S. Court of Appeals for the Ninth Circuit, which is based in San Francisco.

The two Syrian families -- two brothers, their wives, and two children -- were traveling to the U.S. to join family members already settled in Allentown. Grode said the families had begun their application process in 2003 and recently received the U.S. government's signoff. The families are being sponsored by a sibling, an Allentown dentist, Ghassan Assali. Grode said it is typical for such sibling applications to drag on for years. One wrinkle in the effort to return, Grode said, is that flights to the U.S. from the region are booked solid, as visa holders seek to take advantage of the order lifting the Trump administration ban.

The families are suing Trump and his administration to overturn the travel ban. In an ironic turn, Sarmad Assali, wife of Ghassan, said the family had voted for Trump.