President Barack Obama announced Thursday he is ending a longstanding immigration policy that allows any Cuban who makes it to U.S. soil to stay and become a legal resident.

The repeal of the “wet foot, dry foot” policy is effective immediately. The decision follows months of negotiations focused in part on getting Cuba to agree to take back people who had arrived in the U.S.

“Effective immediately, Cuban nationals who attempt to enter the United States illegally and do not qualify for humanitarian relief will be subject to removal, consistent with U.S. law and enforcement priorities,” Obama said in a statement. “By taking this step, we are treating Cuban migrants the same way we treat migrants from other countries. The Cuban government has agreed to accept the return of Cuban nationals who have been ordered removed, just as it has been accepting the return of migrants interdicted at sea.”

The Cuban government praised the move. In a statement read on state television, it called the signing of the agreement “an important step in advancing relations” between the U.S. and Cuba that “aims to guarantee normal, safe and ordered migration.”

Obama is using an administrative rule change to end the policy. Donald Trump could undo that rule after becoming president next week. He has criticized Obama’s moves to improve relations with Cuba. But ending a policy that has allowed hundreds of thousands of people to come to the United States without a visa also aligns with Trump’s commitment to tough immigration policies.

President Bill Clinton created “wet foot, dry foot” policy in 1995 as a revision of a more liberal immigration policy that allowed Cubans caught at sea to come to the United States become legal residents in a year.

The two governments have been negotiating an end to “wet foot, dry foot” for months and finalized an agreement Thursday. A decades-old U.S. economic embargo, though, remains in place, as does the Cuban Adjustment Act, which lets Cubans become permanent residents a year after legally arriving in the U.S.

Under the terms of the agreement, Cuba has agreed to take back those turned away from the U.S., if the time between their departure from Cuba and the start of deportation hearings in the U.S. is four years or less. Officials said the timeframe is required under a Cuban law enacted after Congress passed the Cuban Adjustment Act.

Officials said the changes would not affect a lottery that allows 20,000 Cubans to come to the U.S. legally each year. But Ben Rhodes, Obama’s deputy national security adviser, cast the shift as a necessary step toward Cuba’s economic and political development.

Preferential immigration treatment for Cuban immigrants enticed millions to flee the island, fueling economic stasis and a severe “brain drain.” Meanwhile in the United States, the growing Cuban-American population become a potent political, cultural and economic force. There are around 1.8 million Cuban-Americans today, including two Republican 2016 presidential candidates, Marco Rubio and Ted Cruz.

Since October 2012, more than 118,000 Cubans have presented themselves at ports of entry along the border, according to statistics published by the Homeland Security Department, including more than 48,000 people who arrived between October 2015 and November 2016.

No more articles