A week before Barack Obama hands the presidency over to Donald Trump, the outgoing administration is making a significant change to American immigration policy.

But not in the way you might think: Obama is making it harder, not easier, for certain people to enter the US.

According to reports from the Associated Press and the Washington Post, the White House will be ending the policy that allowed any Cuban national who reached US soil to enter the country legally on humanitarian grounds. (Details of the change are still unclear, but it appears that Cubans will be treated like other immigrants attempting to enter the US — and only allowed to stay if they can demonstrate credible fear of persecution.)

The US has had de facto open borders for Cuban immigrants since the mid-1960s. The current policy, known as “wet foot, dry foot” — because Cubans who were apprehended by the Coast Guard before reaching the shores of Florida could be turned away, but Cubans who’d arrived on land were not — dates to the mid-1990s.

But US/Cuban relations have changed drastically in the two years since President Obama and Cuban President Raúl Castro reestablished diplomatic relations. The antagonistic attitude implied in (and reinforced by) the “wet foot, dry foot” policy has become at least a little obsolete now that the US’s relationship with Cuba is no longer totally different from its relationship with, say, Mexico.

In 2017, immigration from Cuba looks a lot like immigration from other countries — making “wet foot, dry foot” a conspicuous loophole. And now the Obama administration is closing it.

A Cold War relic that’s come increasingly under strain

Cubans have been trying to cross the 90 miles of ocean to Florida since Fidel Castro took power in 1959, and America has always been generous toward them — granting Cubans who came to the US “parole,” which allowed them to enter and live in the country without being unauthorized immigrants. But parole is a temporary form of relief that’s supposed to be used only in particularly pressing humanitarian circumstances — like, say, people fleeing a communist dictatorship.

In 1966, the US codified its policy toward Cuban immigrants. Two years after they were allowed to enter the US, they’d be allowed to apply for permanent residency (green cards) — giving them access to many government benefits, and the ability to apply (after five more years) for US citizenship. After 1976, that policy got even more generous — Cuban immigrants could get green cards after only one year.

This made perfect sense at the time. Cuba was America’s nearest Cold War enemy, and the US made a point of offering safe harbor to political dissidents fleeing communist regimes in Latin America. Of course it would greet people fleeing Castro’s totalitarian misery with open arms.

But once the Cold War ended, things started to get trickier. After a surge in Cuban migration to Florida in the mid-1990s, Bill Clinton (at the behest of Fidel Castro) tweaked the policy toward Cuban immigration: Would-be immigrants who were apprehended by the Coast Guard offshore wouldn’t be able to benefit from the humanitarian loophole, but those who made it to land still could. In other words: wet foot, dry foot.

Over the decades, the reasons for Cubans to immigrate to the US had also shifted. Instead of fleeing political persecution, many newer Cuban immigrants sought economic opportunity in the US — blurring the distinction between Cubans allowed to “get legal” and immigrants from other Latin American countries, including Mexico, who didn’t have loopholes of their own.

This hollowed out political support for “wet foot, dry foot” in two ways. For one, it moved America’s Cuban-American population in a more moderate direction, away from the hard anti-Castro line of the 20th century — which cleared the way for Obama’s detente with Cuba in 2014.

But the shift in migration also made anti-Castro Cubans turn against “wet foot, dry foot.” They worried the new migrants were abusing the system as a form of transnational welfare fraud: coming to the US for a year, getting their green cards (and the benefits that came with it), and then moving back to Cuba to live off their American benefits checks.

The thaw in US/Cuba relations has made “wet foot, dry foot” increasingly unsustainable

In 2014, the US and Cuba announced several steps to restore normal relations, including changes to everything from the trade embargo to reopening direct flights between the two countries. “Wet foot, dry foot” began to come under scrutiny — it wasn’t clear that the US would maintain such an antagonistic policy.

Cubans responded by rushing to the US in greater numbers than ever before.

Many Cubans, instead of trying to come by sea (and risking Coast Guard apprehension), traveled through Central America and Mexico — joining a mixed flow of asylum seekers and economic migrants from those countries and more.

At one point in 2016, 8,000 Cubans got stranded in Costa Rica when Nicaragua closed its border to them — the US ultimately had to airlift them to Florida. Those who did make it to the US, often arriving through Texas, put a strain on Border Patrol agents not used to dealing with Cubans (and caused Texas Republicans to join the chorus calling for “wet foot, dry foot” to end).

The flow hasn’t let up after the death of Castro; the Coast Guard apprehended 136 “wet foot” Cubans in the days after the death. Donald Trump’s impending inauguration isn’t deterring them either — thousands of Cubans have continued to travel north through Central America in the months after his election, expecting to benefit from “wet foot, dry foot.”

Meanwhile, the opening of US/Cuban air travel renders the whole concept of “wet foot, dry foot” incoherent, since Cubans will now be able to fly into the US and seek adjustment from there — or continue to take the overland route via Central America, exacerbating the strain that Border Patrol is under as Central American families continue to come to the US to seek asylum.

In other words, in every respect, people coming from Cuba to the US are identical to people coming from elsewhere — except that they were allowed to come here first and get legal status afterward without difficulty. It was an inconsistency that both sides of the immigration debate wanted to fix.

President-elect Trump, however, appears to be uninterested in detente with Cuba, and has talked about ending some of Obama’s reforms. So he could bring back “wet foot, dry foot.” It just depends on whether his desire to restore antagonistic relations with Cuba is greater than his desire not to let people indiscriminately immigrate to the US.