The Trump administration announced on Monday that nearly 200,000 Salvadorans living in the United States have to leave by late next year. Come September 2019, these immigrants will no longer have Temporary Protected Status, meaning they won’t be allowed to lawfully work and live in the country as they have over the past 20 years. Instead, they’ll face a dire choice: Stay in the United States as undocumented immigrants, and live in constant fear of arrest and deportation, or leave behind the lives they’ve built for a new start in a more dangerous country.

From where does Trump draw the authority to throw thousands of law-abiding families’ lives into chaos? The Constitution grants the power to shape the nation’s immigration laws to the legislative branch, not the president. But Congress has all too often abdicated that discretion to presidents and immigration agencies, which Trump is now exploiting after his campaign promises to deport undocumented immigrants and restrict legal immigration.

When Trump comes up against the separation of powers, he typically loses. The judiciary pared back his controversial travel ban, and blocked his orders to withhold federal funds from sanctuary cities and ban transgender Americans from military service. His push to repeal the Affordable Care Act dramatically collapsed in Congress over the summer, leaving only an unpopular overhaul of the nation’s tax laws as Republicans’ major legislative accomplishment to date.

When relying on the discretion that Congress has given his predecessors, however, Trump’s exercise of executive power has been staggering in its scope. Homeland Security officials announced last year that they will also rescind Temporary Protected Status (TPS) for about 59,000 Haitians and roughly 2,500 Nicaraguans living in the U.S. Some 700,000 immigrants will face a similar situation if the Deferred Action for Childhood Arrivals program is allowed to expire in March. All in all, unless Congress intervenes, the Trump administration will have stripped almost one million longtime U.S. residents of their legal status by 2019.

All of this is legal under the Immigration Act of 1990, which first established TPS in federal immigration law. Under the act, the secretary of the Department of Homeland Security—previously the attorney general before that department’s creation—can provide temporary legal status to non-citizens if their home countries are suffering from civil wars, natural disasters, or “other temporary and extraordinary conditions.” The program currently applies to ten countries: El Salvador, Haiti, Honduras, Nepal, Nicaragua, Somalia, Sudan, South Sudan, Syria, and Yemen. The humanitarian logic behind the provision is clear: It would be cruel, for instance, for Syrians in the United States to be sent back to their war-ravaged country.

El Salvador was one of the inaugural countries to fall under the TPS program, shielding tens of thousands of Salvadorans who fled the country during its civil war in the 1990s. Clinton administration immigration officials let the designation expire two years after the war ended in 1994 while assuring recipients they could still apply for asylum. The George W. Bush administration placed the country back on the list after two major earthquakes in 2001 killed hundreds and leveled tens of thousands of buildings. The move protected Salvadorans in the United States—those who passed a background check and had a clean criminal record, among other requirements under federal law—from removal to a country still rebuilding itself.

Immigrant-rights groups praised the Bush White House for its humanitarian response to the crisis. Francisco Flores, El Salvador’s president at the time, said that remittances from Salvadorans working in the United States to their family members back home would boost reconstruction efforts as much as the Bush administration’s aid package to the country. The Obama administration, citing continuing troubles in El Salvador, continued to renew the country’s status in the program.

Many Salvadoran families covered by TPS have built successful lives in America. A 2017 report by the Center for Migration Studies found that 81 percent of Salvadoran TPS recipients are above the poverty level, a rate only slightly lower than that of the average American family. Their employment rate equals that of America as a whole. One-third of them have mortgages. They are raising at least 197,000 American-born children—and now will have to decide whether to leave them with a caretaker in the United States, or take them back to a troubled country.

In announcing the final 18-month renewal of Salvadorans’ protected status on Monday, U.S. officials concluded that the country has sufficiently recovered from the earthquake to warrant the Salvadorans’ return. That assessment elides the country’s ongoing instability. As Vox’s Dara Lind noted on Monday, the Central American country is considered to be one of the most dangerous places in the world, with a homicide rate 22 times higher than that of the United States. A notable share of that violence comes from gangs that took root in El Salvador after the United States deported thousands of “criminal aliens” to the country in the early 1990s.

Trump administration officials are quick to note that the president campaigned on aggressive enforcement of immigration laws already on the books. At the same time, plans to reduce legal immigration through Congress haven’t gained traction so far. In August, Trump threw his weight behind the RAISE Act, a bill drafted by two Republican senators who have taken hardline stances on immigration. If signed into law, the proposed legislation would cut legal immigration in half over the next decade and scrap family-oriented provisions in federal immigration law in favor of a “merit-based” system for green cards.

Instead of that bill, Democratic and Republican leaders in Congress are negotiating a permanent legislative fix to grant DACA recipients legal status before the program expires in March. House Minority Leader Nancy Pelosi on Monday called for a similar measure for those losing their TPS status.

TPS recipients who live in the jurisdiction of two of the federal appeals courts may also be able to secure a more permanent legal status under two largely overlooked court decisions. The Ninth Circuit Court of Appeals, which covers the entire West Coast, ruled last year in Ramirez v. Brown that recipients of TPS satisfy a key legal requirement to apply for a green card. The Sixth Circuit, which covers Ohio and other Midwestern states, reached a similar conclusion in 2013.

Hundreds of thousands of U.S. immigrants’ legal status and livelihood rest on the whims of the Trump administration. If a president can throw so many lives into chaos at once under current federal law, then responsibility for the consequences also lies with those who gave him the power to do so. Congress has an opportunity to remedy the error, and legislators should take it.