US president-elect Donald Trump says he is committed to enforcing the nation’s immigration laws. If he means it, he’s going to have to give the surging number of Central American immigrants entering the country illegally a fair chance to stay.

The US, both its institutions and politicians, have long seen the Latin Americans who slip past the Rio Grande without papers as law breakers in search of a job. US regulations are clear on how authorities should respond: by apprehending and deporting international trespassers. But a rapidly growing number of immigrants caught by border patrol agents today are refugees—or at least they claim to be. In that case, American codes call for a much different response. As a signatory to a 1967 international treaty, the “Protocol Relating to the Status of Refugees,” the US has committed to protecting people facing persecution in their home country.

President Barack Obama wasn’t very adept at handling the dramatic switch in the nature of illegal immigration into the US, which has largely happened under his watch. His policies have mostly focused on dissuading people from coming to the US, not figuring out whether they deserve protection. Trump’s centerpiece immigration policy, erecting a towering wall between the US and Mexico, doesn’t suggest his government will get any closer to meeting US obligations to refugees under both US and international law.

A refugee crisis

In fact, Trump’s fixation with blocking illegal immigration from Mexico, which has plummeted in recent years, obfuscates the problem. Yes, border patrol agents are apprehending thousands of people every month along the US-Mexico line, but many of them—around half, according to Claire McCaskill, a member of the US Senate’s homeland security and governmental affairs committee—turn themselves in voluntarily asking for help. Government statistics bear this out. The number of immigrants claiming fear of persecution or torture in their home countries is on the rise, and so are the findings that those claims are credible. In order to be considered for asylum by an immigration judge, immigrants first have to go through a “credible fear” screening, in which an asylum officer determines whether the claims they are making have a “significant possibility” of holding up in court.

More than 70% of those who claimed credible fear in the 2016 fiscal year hailed from El Salvador, Honduras, and Guatemala, places beset by rampant violence.

Under US law, individuals who are found to have credible fear have the right to due process to determine the validity of their claims in the court. Whether they are Syrians escaping civil war, or El Salvadorans fleeing from criminal gangs, what they have to prove is the same: that they face persecution because of their race, religion, nationality, membership in a particular social group, or political opinion.

But US authorities don’t always take Central American immigrants’ fears seriously, studies suggest. One, released by the American Immigration Lawyers Association in 2016, found that not all border patrol agents are asking immigrants if they’re afraid to return to their country, as they are required to do. Other agents refuse to believe them, per the report, which is based on immigrant testimony documented by the group. Another 2016 analysis, by the US Commission on International Religious Freedom, a government advisory body, noted, “outright skepticism, if not hostility, toward asylum claims” by certain officers, among other practices that may be resulting in deportations of refugees with a legitimate right to stay.

A US Customs and Border Protection (CBP) spokesman said the agency “strives to treat every person we encounter with dignity and respect.” Anyone with concerns about the treatment doled out by its officers can call the agency, he added.

Unequal treatment?

There is also evidence that suggests immigrants are not getting equal treatment once their cases reach the courts. For example, immigration judge Agnelis Reese, in Oakdale, Louisiana, didn’t grant a single asylum request out of the 169 decisions she made during fiscal years 2011-2016, according to data compiled by Syracuse University’s Transactional Records Access Clearinghouse. Meanwhile, judge Frederic Leeds, in New York, approved 98% of the 700 cases or so he handled. Indeed, a statistical analysis by the US’s Government Accountability Office confirms that, even when controlling for a variety of factors, asylum grant rates vary widely—by at least 47 percentage points—from judge to judge.

It doesn’t help that the US has failed to devote enough resources to deal with the spike in asylum requests made with US Citizen and Immigration Services, generating a bulging bottleneck.

The immigration court system overall—which handles certain asylum cases, but also deportation hearings, for example—is similarly backlogged.

Yet, the bulk of US government measures meant to address the rise in Central American immigrants are designed to deter them from coming in the first place, instead of building a better system to weed out fraudsters from legitimate refugees. Despite evidence that some immigrants are gaming the system, the fact remains that the US is legally required to give a fair hearing people who say they are afraid to return home.

The reckoning

The Obama administration’s response has already run up against the law. For example, several courts have shot down the government’s arguments and efforts to justify the detention of children and families while their cases wait to be resolved—a policy meant to convince would-be immigrants to stay home.

On Jan. 13, a coalition of immigrant rights groups filed a formal complaint with the Department of Homeland Security’s Office for Civil Rights and Civil Liberties accusing CBP officers of turning back people requesting asylum at ports of entry along the US-Mexico border. In what the groups called an “alarming new trend,” the officers have allegedly been telling immigrants that they can’t enter the country without a visa— contrary to US law—and referring them to Mexican immigration authorities.

Trump has framed his border policy as a choice between enforcing existing laws against illegal immigration or skirting them. But the decision facing US leaders is rather more complicated: Should the US continue providing refuge to those who are unfairly persecuted in their home countries?

If Americans are unwilling to do that, perhaps it’s time to do away with the nation’s asylum laws—and remove the famous poem at the base of the Statue of Liberty welcoming the world’s “huddled masses yearning to breathe free.”

Recently retired immigration judge Paul Wickham Schmidt put it this way: “We like to advertise ourselves as a beacon of liberty and justice; it’s time we acted that way.”