Senior State Department officials and career diplomats repeatedly warned the Trump administration that taking away legal protections for immigrants from El Salvador, Honduras, and Haiti would put national security, foreign relations, and the immigrants’ American-born children at risk, according to internal State Department documents.

But Trump did it anyway — and concerns about the 2020 election appear to have helped determine the timeline for requiring immigrants to leave, according to the documents, which will be released in a report by the Senate Foreign Relations Committee on Thursday.

About 400,000 citizens of El Salvador, Honduras, and Haiti have been able to stay in the US through Temporary Protected Status (TPS), a protection allowing them to legally live and work in the US typically offered to citizens of countries suffering from natural disasters or armed conflict.

President Donald Trump tried to end TPS for El Salvador, Honduras, and Haiti, among others, starting in November 2017. He argued that conditions in those countries have improved enough that their citizens can now safely return.

“The law is relatively explicit that if the conditions on the ground do not support a TPS designation, the [administration] must terminate the TPS designation,” a senior administration official told reporters at the time.

The almost 80 pages of internal State Department memos and diplomatic cables — obtained by the Senate Foreign Relations Committee as part of an investigation commissioned by Sen. Bob Menendez, the top Democrat on the committee — show that senior agency officials advised former Secretary of State Rex Tillerson that revoking TPS would destabilize the three countries and recommending that, if he must end the program, it should be wound down over three years.

But a State Department policy memo from 2017 also noted that this would put the end of the program “directly in the middle of the 2020 election cycle.” Tillerson scribbled on the memo that the wind-down period should instead be 18 months — a decision that ran counter to every recommendation by career diplomats in the State Department.

The State Department did not immediately respond to requests for comment on Thursday.

Courts have so far kept the protections alive following legal challenges brought by advocacy groups. But should the Trump administration eventually be allowed to end them, the documents warn of dire consequences.

Career State Department officials argue that ending the protections, which would force the immigrants to leave or go underground, would hurt efforts to combat international criminal gangs and drug trafficking. It would worsen the poverty, political volatility, and violence causing unauthorized immigration to the US in the first place.

And it could directly endanger hundreds of thousands of American citizens: The documents include an estimation that ending the protections would mean 273,000 US citizen children would either be separated from their immigrant parents, or have to return to El Salvador and Honduras, where, the experts warn, they could be recruited by criminal gangs such as MS-13.

In light of these concerns, Thomas Shannon, the most senior foreign service official in the State Department at the time, appealed to Tillerson to renew protections for immigrants from the three countries.

“It is rare for the State Department to be asked to comment on an issue with such immediate domestic political ramifications,” he wrote in a previously undisclosed memo in October 2017. “I understand the delicate nature of the decision. However, it is our purpose to provide the best possible foreign policy and diplomatic advice. From my point of view, that advice is obvious: extend TPS for the countries indicated.”

Instead, in November 2017, Trump announced his decision.

Ending TPS was extraordinarily divisive in the State Department

The report shows that there was unusual infighting in the State Department over whether to end the program at all.

One question was whether El Salvador, Honduras, and Haiti were ready to start reabsorbing their citizens who had been living in the US for years or even decades. The US conferred TPS on citizens of El Salvador after a 2001 earthquake, Hondurans after a 1999 hurricane, and Haitians after a 2010 earthquake. In each case, the natural disasters displaced hundreds of thousands of people and left the countries in ruins.

The State Department’s Bureau of Western Hemisphere Affairs, as well as the Office of Policy Planning, argued that enough time had passed for the three countries to recover.

“Beneficiaries and their countries of origin know that this is a temporary program governed by statute that must eventually come to an end,” reads a previously undisclosed memo from the policy office, dated October 26, 2017. “Another extension for any of these countries based on environmental disaster that struck more than a decade ago (slightly shorter for Haiti) is not supported by the facts on the ground and will only delay the inevitable.”

Other senior officials disagreed. They acknowledged that the countries had largely rebuilt after the disasters, but had not recovered from the resulting “cascade of political economic and social crises whose impacts are still deeply felt,” Shannon wrote in his memo to Tillerson. Though conditions in Haiti relating to the 2010 earthquake had improved, for example, housing shortages and public health crises remained, particularly in the camps for internally displaced individuals where there were cholera outbreaks.

In the memo, Shannon; the State Department’s Bureau of Populations, Refugees and Migration; and the three US embassies in El Salvador, Honduras, and Haiti urged Tillerson not to end the protections.

“Doing so would not only continue the compassion and generosity that have underscored our approach to disaster and humanitarian assistance over time,” Shannon wrote. “It would also guarantee the necessary partnerships we have built with these countries and others in the struggle to promote safe and orderly migration, and fight the traffickers and criminal organizations that prey on the fears and aspirations of our neighbors.”

Both El Salvador and Honduras remain hotspots of crime, violence, and gang activity, driving hundreds of thousands of their citizens to continue to seek asylum in the US each year. El Salvador has the highest homicide rate in the world while Honduras ranks fifth, according to the United Nations Office on Drugs and Crime. The State Department has issued travel warnings for US citizens in both countries.

Then-US Ambassador to El Salvador Jean Elizabeth Manes warned in a July 2017 diplomatic cable that El Salvador could not guarantee the safety of returning citizens and their American children or provide them with necessary public services, such as education.

Two State Department bureaus sounded similar alarms, writing in a memo that returning citizens and their families, including their US citizen children, would make them “vulnerable to recruitment by transnational criminal organizations, such as MS-13,” if sent back to El Salvador and Honduras:

These returnees would need to compete with locals to find scarce jobs in order to support themselves and their families. The lack of legitimate employment opportunities is likely to push some repatriated TPS holders or their children into the gangs or other illicit employment.

Rather than subject their children to such dangers, they wrote, many would likely instead choose to leave their American children in the US.

Officials warned of grave security and foreign policy implications

Opponents of ending the protections argued that it would worsen the problems driving emigration from Central America.

In the documents, they claim that none of the countries could economically reintegrate hundreds of thousands of their own citizens at once. El Salvador is unable to create the 60,000 jobs annually that are necessary for the population within its borders.

Without adequate job opportunities, citizens leaving the US could displace existing workers in those countries, they warned, and that would spur more unauthorized immigration to the US. (While Trump’s primary focus has been blocking unauthorized immigrants from Central America, Haitians have also been arriving at the US southern border.)

“Given that most Hondurans who migrate do so for economic reasons, adding tens of thousands of deportees to an economy that is not prepared to integrate them will only exacerbate the principal cause of irregular migration,” Heide Fulton, then-interim head of the US Embassy in Honduras, wrote in a June 29, 2017, diplomatic cable. “This would impose severe burdens on a cooperative but underresourced [Honduran government] and be counterproductive to US interests.”

The affected countries might also become less willing to partner with the US if their TPS status were revoked, the officials warned: The migration and Western Hemisphere affairs bureaus argued that ending TPS for El Salvador and Honduras could lead those countries to scale back their joint counternarcotics and anti-gang initiatives with the US, as well as their efforts to stem unauthorized immigration.

Officials advised Tillerson to wind the protections down slowly. He ignored them.

Given the “tremendous difficulties managing the sudden return of tens of thousands of TPS beneficiaries and dependents” the three countries would face, senior officials urged Tillerson to “strongly endorse” a 36-month wind-down period for the program.

But in a separate memo dated the same day, senior officials from the State Department’s policy office suggested he speed it up:

Although a 36-month wind down period is not precluded by the plain language of the statute, this period would double the longest amount of time TPS status can be extended under the statute. It would put the wind down of the program directly in the middle of the 2020 election cycle. Moreover, two years should be enough time for TPS beneficiaries and their home countries to prepare for their departure, as it is very unlikely that they will return all at once.

Tillerson ultimately accelerated even further, scribbling on the memo that it should instead be 18 months.

The documents don’t explicitly say the decision was made for political reasons. But they do note that ending temporary protections for immigrants from the three countries could incite political backlash.

Many immigrants with temporary protected status have lived in the US for the better part of a decade or longer. And the “splitting of beneficiaries from their American citizen children will likely cause backlash from communities across [America] and from political leaders across the spectrum,” officials from the migration and Western Hemisphere bureaus wrote in one of their memos.

The report from the Senate Foreign Relations Committee, drawing on the documents, argues the Trump administration put concerns over reelection above the well-being of immigrants and their families.

“Trump administration political appointees thus injected electoral considerations not contemplated under the TPS statute, raising the likely prospect that the Trump administration elevated electoral concerns over US national security and the personal safety of nearly 400,000 TPS recipients and an estimated 273,000 American children,” Menendez writes in the report.

Ending the protections would prompt what the report calls “a new family separation crisis — one that has a direct impact on American families,” it argues. The 273,000 US citizen children who could be affected are far more numerous than the almost 5,500 the Trump administration has admitted to separating as a result of its “zero tolerance” policy of prosecuting all unauthorized border crossers.

“This prevalence of de facto forced family separation would have a lasting and traumatizing impact on the lives of the US citizen children of TPS recipients and would irreparably harm American families,” the report says.

The Ninth Circuit could rule any day now in one of the cases over the Trump administration’s decision to end TPS. No matter the decision, it will likely set up a high-profile showdown over TPS at the Supreme Court. If the administration prevails, it had previously agreed to establish a minimum 120-day wind-down period for TPS protections.

Tom Jawetz, vice president of immigration policy at the Center for American Progress think tank, said that the new evidence in the report suggesting the Trump administration was swayed by political motivations over the dangers to American children in deciding to end TPS could be helpful to legal challenges.

“This strongly supports the argument that the decision to terminate for these three countries at least was arbitrary and capricious,” he said.