Soon after taking office, President Trump vowed to help Christians facing religious persecution in the Middle East.

But his administration has taken a very different approach at home, pushing to deport scores of Iraqi Christians who fear violence in their homeland and going so far as to appear to falsely represent to a judge that the Iraqi government was willing to accept them, according to court documents made public last week that included hundreds of pages of internal government emails and memos.

The previously undisclosed details of the Trump administration's allegedly deceptive tactics emerged as part of a Michigan court case where 1,400 Iraqi nationals, including many Christians from a community that strongly supported Trump, are fighting to stay in the U.S.

"We're concerned that this is really the tip of the iceberg in terms of misrepresentations that ICE is providing to the courts," said Miriam Aukerman, an attorney with the American Civil Liberties Union, which is representing the Iraqis. "If they can do this here, where else are they doing it?"

The Iraqis were swept up in raids last year that largely targeted those convicted of crimes. Many of them had been living in the U.S. for decades, and in some cases the crimes date back to the 1980s and 1990s.

The ACLU's claims center on an argument that immigration officials made to the court last year when the judge was considering releasing about 300 Iraqis because they had been in ICE detention facilities for six months.

Seeking to convince a judge the detainees would soon be deported, a senior ICE official said in a memo to the court told that flights carrying the Iraqis out of the U.S. were ready to leave any day so long as the judge didn't get in the way.

But the documents, made public because the judge lifted a protective order, tell a different story.

According to a government memo dated July 19, 2017, ICE Deputy Assistant Director John Schultz's unit was drafting a visa sanctions package for Iraq because of the country's opposition to accepting the detainees.

The memo says ICE had been "unsuccessful in securing cooperation from the Government of Iraq in the acceptance of its nationals subject to final orders of removal." ICE officials thought sanctions were the "only remaining avenue available to secure cooperation," the memo says.

It refers to Iraq as one of the "most recalcitrant countries."

But on the very next day, July 20, 2017, Schultz submitted a sworn declaration to the court that said Iraq was happy to accept the detainees.

"Due to renewed discussions between the U.S. and Iraq in recent months, Iraq has agreed, using charter flights, to the timely return of its nationals that are subject to orders of removal," the declaration says.

Just last week, the ACLU asked the court to sanction the U.S. government for what it describes as "lying to keep the detainees locked up."

Astevana Shaya, 28, of Sterling Heights, Mich., wears a Chaldeans Lives Matter T-shirt at a protest on June 12, 2017 in Sterling Heights, Michigan. The arrests of dozens of Iraqi Christians in southeastern Michigan by U.S. immigration officials appear to be among the first roundups of people from Iraq who have long faced deportation, underscoring rising concerns in other immigrant communities. Todd McInturf / Detroit News via AP file

Justice Department lawyers representing ICE strongly denied the charges.

The statements from ICE officials were "true when they made them," attorney Williams Silvas told the court. "The undisputed evidence shows that Iraq is working with the United States to repatriate" the Iraqis, just as Schultz and other ICE officials "said they would," he added.

As Trump contemplates closing the Southern border to halt the crossing of Central American families, the documents reveal a gap between what the administration says publicly and some conversations behind the scenes, and offer new insight into how the administration's hardline immigration policy has become a diplomatic priority.

The story begins in Jan. 2017 when Trump signed an executive order barring citizens of seven Muslim-majority countries from entering the U.S.

Not long after, according to an account in a State Department cable, the U.S. floated an offer to Iraq: if the country agreed to accept a charter flight of deportees, the U.S. would remove it from the banned list.

Iraq bought in and on April 19, eight Iraqi nationals arrived at Baghdad airport. U.S. Embassy officers and Iraqi intelligence officers gathered there to witness their return.

"There were some handshakes, tears and even a kissing of the ground," an officer wrote in an embassy cable released by the court this week.

State Department officials saw it as an indication of more deportations to come. "Those on the tarmac seemed to know this would not be the last trip," the cable reads.

Those in the loop appreciated the cable's flare. "The last line about kissing the ground is a nice touch," Simon Hankinson, now consul general in Marseille, France, wrote in an email to ICE officials.

But that heady period wouldn't last long.

Iraq had a longstanding policy that it would not accept involuntary repatriations, citing humanitarian concerns. Complicating matters even further, the Iraqis had a history of refusing to repatriate any Iraqi without a recent passport.

State Department and ICE officials thought Iraq's new willingness to accept deportation charter flights — which it had not done since 2011 — would let them get around those hurdles. "As long as the flights continue to flow, my bosses will be happy," ICE desk officer Julius Clinton wrote to state officials in June, according to an internal document.

ICE quickly planned a second flight for late June 2017, aiming to deport 75 people. But to fill those seats, it would have to make arrests.

A senior ICE official laid out the situation plainly in an email to colleagues.

"The Iraqi Government has agreed to take back their nationals and the Department of State is basically forcing their hand to accept our charter flights, pending that an alien is truly Iraqi," ICE Supervisory Detention and Deportation Officer Chris George wrote in an email to colleagues that was made public last week. "We are essentially going over the Consulates and Embassy's (sic) heads and going right to the Ministry of Foreign Affairs in Baghdad."

Ten days later, ICE agents swept through Iraqi communities across the country picking up nearly 200 Kurds, Sunni and Shia Muslims and Christians. Half of the arrests came in the Iraqi enclaves in the suburban Detroit area, the largest community of Chaldean Christians outside of Iraq.

The Aramaic-speaking Chaldean Catholics began arriving in the U.S. as refugees in the 1970s. Those who stayed behind were in recent years persecuted by ISIS in what the U.S. has described as a "genocide."

Eddie Bajoka, a Chaldean attorney who now represents some of the Iraqis, was on the golf course in Michigan the Sunday of the ICE round-up. His phone wouldn't stop ringing.

"I was getting calls from people who were frantic saying their loved ones were just taken. That ICE was at their door," Bajoka told NBC News soon after the raids. "It was heartbreaking."

Fear rippled through Chaldean neighborhoods with the news that ICE had come for Usama Hamama. The community knew "Sam" from his post as manager of the Hamama family grocery store and his fundraising efforts for his church on behalf of Chaldean refugees.

In the late 1980s, Hamama had been sentenced to two years in prison for a road rage incident in which he brandished a gun. After he served his time, he married a Chaldean woman, who like him had arrived in the U.S. as a child. They had four children, who they raised in suburban Detroit. By the time ICE knocked on his door that June, Hamama's children were in their late teens and early 20s, and his deportation order was two decades old.

If Hamama could be arrested, it seemed anyone was fair game, said Nadine Yousef, founder of CODE Legal Aid, a local advocacy organization that works with Chaldeans. The community knew there were those among them with criminal records and deportation orders, but few had seen this coming.

"This community voted for Donald Trump in large numbers," said Yousef. "Every single time he got on stage he talked about Christians in the Middle East. Why would he send our community back when he's talking about how there's a genocide going on?"

Across the country, there are more than 1,400 Iraqis who have a final order of deportation, more than half of whom lost their green cards due to a criminal conviction. The convictions range from rape, murder, and kidnapping to marijuana possession.

Days after the arrests, the ACLU filed a lawsuit to stop the deportations of the Michiganders, which would later expand into a class-action covering all 1,400 Iraqis. Meanwhile, the more than 200 detainees picked up in June were calling their families asking them to pack suitcases because the government told them a flight would leave any day.

Communications behind the scenes indicated otherwise.

In June, the Iraqi ambassador to the U.S. expressed concerns about deporting people who had served their time years ago and moved on with their lives, marrying an American citizen or having citizen children, emails from the State Department show.

U.S. officials were unmoved.

"Just because someone got away with a crime for two decades doesn't mean they should suddenly get let off the hook," Scott Riedmann, U.S. consul general in Baghdad, wrote in an email to State Department colleagues.

Nevertheless, State Department officials recommended to ICE that it fill each flight with some deportees who had recent removal orders in order to avoid trouble with the Iraqis.

But in late June, a week before the scheduled deportation flight, U.S. officials got notice that the Iraqi prime minister would not approve the scheduled charter.

A few days later, talks broke down further. After a meeting with the State Department, a high-level ICE official relayed to Schultz that it looked like there was "no defined way forward as to Iraq," according to an internal document.

But ICE and the State Department kept trying for a flight. They saw some movement when Iraq sent consular officials to interview some of the detainees in mid-July-- but Iraq continued to express concern about taking back failed asylum seekers who might be "at risk if returned."

State officials advised ICE on July 17 that if the first few charter flights only had deportees with criminal records, it would give the Iraqi government the "necessary political cover and give us what we want with respect to implementing a regular return schedule," according to an email from a U.S. consulate official in Baghdad.

Frustrated, Schultz's unit at ICE began drafting the sanctions package which said that ICE and State hadn't been able to get Iraq to cooperate in removals.

But in his sworn statement to the court submitted the following day, Schultz said Iraq was playing ball. He argued that ICE would spend millions holding the detainees if the court granted the ACLU's petition to halt the removals. He also cited the potential for "severe harm to international relations."

The court nevertheless granted a nationwide stay on removals to give the 1,400 Iraqis time to return to immigration court to plead their cases.

"Their status as religious minorities places them at grave risk of torture and other forms of persecution at the hands of ISIS, other Sunni insurgencies, and the various Shi'a militias," U.S. District Court Judge Mark Goldsmith wrote in the July 2017 decision.

In January, Goldsmith ordered that the Iraqis be granted bond hearings, but he delayed his decision on whether to order all of them to be freed. By law, detainees cannot be held indefinitely. ICE officials continued to assert only the court injunction stood in the way of resuming removals.

But behind the scenes the Iraqis continued to tell ICE they would not take deportees who didn't agree to go. In March 2018, the Iraqi minister in charge of migration solidified that position in an official letter sent to others in the Iraqi government asserting that the "forced return of Iraqis...conflicts with humanitarian laws."

In court last week, government attorneys said Iraq has shown it is willing to repatriate even Iraqis who do not agree to go. Iraq has issued documents for six Iraqis who didn't sign papers to go voluntarily, attorneys said, arguing against the ACLU's motion to free the Iraqis who remain detained.

Asked by Judge Goldsmith how quickly the deportations might happen if he lifted the court's stay on removals, DOJ attorney Joseph Darrow didn't have a clear answer. "ICE is moving expeditiously" he said, but it would be "difficult to establish any particular timeline."

Meanwhile, the Iraqis remain in limbo – 100 of them still in detention – unclear when deportation or a reprieve might come.