Supporters of Temporary Protected Status immigrants hold signs and cheer at a rally. Court documents released this week reveal efforts by DHS to justify ending TPS for immigrants in certain countries by showing their home countries were safe, even when other officials disagreed. Jeff Chiu

In court documents released this week, internal emails from the Department of Homeland Security show that federal officials tried to prove countries were becoming safer, even when that was not the case, in order to justify ending Temporary Protected Status for hundreds of thousands of people fleeing war or natural disasters.

The American Civil Liberties Union sued the Trump administration in an attempt to restore protected status to immigrants from Sudan, Nicaragua, Haiti, and El Salvador. Thousands from those four countries were given safe haven in the U.S. following crippling natural disasters and civil conflict, but earlier this year the Trump administration officially ended their protected status.

As part of the case, which has a key hearing in front of a judge in San Francisco next month, lawyers for the ACLU and the National Day Laborer Organizing Network convinced the court to order the federal government to disclose communication between DHS officials and other federal agencies, including with officials at the Pentagon and the State Department.

The messages reveal that DHS asked staffers to find "positive gems" about war-torn countries to justify sending more than 300,000 people back to their homelands. The internal back-and-forths also demonstrate more subtle ways DHS sought to downplay the severity of conditions in volatile countries, like using the word "challenges," instead of "disasters" in talking points to the public. That guidance raised alarms with seasoned State Department officials.

For instance, DHS officials wrote that their review of the conflict in Sudan demonstrated that conditions have "sufficiently improved," and that the country, "no longer meets the statutory conditions for designation," since the armed conflict had dissipated.

The problem with that conclusion? It is not accurate, according to an email career foreign service officer for Sudan Paul Sutphin wrote to DHS. He additionally worried that such a soft assessment of dire conditions could imperil Sudanese who have fled violence.

"It is likely that the Sudanese government could view the current language and inaccuracies," Sutphin wrote, "as a green light" from the United States government "to force the return of internally displaced" people "to deadly conflict-affected areas."

Other State Department officials wrote to DHS saying they were caught flat-footed by the demise of a program that has provided legal shelter in the U.S. to hundreds of thousands of people, some having been protected by the status for decades.

"We literally were forced to dispatch our Foreign Affairs Officers by taxi to the embassies with virtually no notice to inform the host governments of the imminent announcement," wrote Chris Ashe, a top State Department official, to DHS leadership.

To ACLU lawyer Ahilan Arulanantham, who is representing five TPS recipients in the suit against the Trump administration, the emails show that DHS is more concerned with carrying out Trump's hardline stance on immigration than it is with following the law.

"They cut diplomats out of the decision-making process. They rewrote their reports, downplayed sometimes really horrific problems in countries and basically did everything they could to justify the result that the Trump administration wanted," Arulanantham said in an interview.

Those policy goals, in Arulanantham's view, are not just unconstitutional, which is what his suit claims, but also "motivated by racist, white supremacist agenda," since, Trump's goal is to "expel as many immigrants as possible" at any cost, he said.

Despite the concerns raised by diplomats and other State Department officials about the justifications DHS was laying out, the Trump administration moved forward with ending the humanitarian program for countries federal officials said no longer deserve the protection.

On Friday, DHS officials told NPR they are standing by the decision. "As intended by Congress, TPS was always meant to be a temporary mechanism to address urgent humanitarian conditions," said Katie Waldman, a spokeswoman for DHS.

"For countries where an extension is justified under the law, DHS has issued appropriate extensions to assist those affected by the conditions prescribed in statute."

People who have protection under TPS have to renew their permits every 18 months. As such, recipients from countries from which Trump has rescinded the protection have a 18 months to leave the country or face deportation proceedings.

That said, the ACLU and immigration advocates are hoping that the pending legal challenge will force a policy shift before thousands have to leave the U.S.

A Sept. 25 hearing has been set in federal court in San Francisco in which ACLU lawyers and the federal government are expected to deliver arguments over whether TPS was ended legally. If not, a judge could order the Trump administration to reinstate the protections.

"The law is if the conditions in the country remain unsafe or unstable then you should extend the temporary protected status," Arulanantham said. "This administration has broken the law." Copyright 2019 NPR. To see more, visit https://www.npr.org.