The Obama administration is ending the 20-year-old “wet foot, dry foot” policy that allows most Cuban migrants who reach U.S. soil to become legal permanent residents after one year.

The decision was confirmed Thursday by a congressional staffer who was briefed by the administration but was not authorized to publicly discuss the plan. The administration is expected to make a formal announcement later Thursday.

Ending the policy means Cubans will no longer receive the preferential treatment they have enjoyed for more than two decades. Migrants from all other countries who don’t have a visa but are determined to enter the U.S. must sneak into the country and live their lives in fear of deportations.

However, the “wet foot, dry foot” policy has meant that Cubans who arrive in South Florida by sea or who simply present themselves at ports of entry along the southwest border are generally allowed to stay.

In exchange, Cuba has agreed to start accepting Cubans who have been issued a deportation order in the U.S., something the communist nation has refused to do for decades.

The decision comes as President Obama tries to cement his historic opening of diplomatic relations with Cuba and one week before President-elect Donald Trump takes office. Obama ended more than five decades of isolation with its Cold War foe in December 2014 and even visited the island in 2016.

Trump has said he would renegotiate the deal with Cuba, and ending the “wet foot, dry foot” policy could affect Trump’s plans.

Sen. Jeff Flake, R-Ariz., who has advocated for closer ties with Cuba and was part of a U.S. delegation that returned American contractor Alan Gross after he was released from prison in Cuba, praised the move.

“Individuals on both sides of the U.S.-Cuba debate recognize and agree that ending ‘wet foot, dry foot’ is in our national interest,” Flake said. “It’s a move that brings our Cuba policy into the modern era while allowing the United States to continue its generous approach to those individuals and refugees with a legitimate claim for asylum.”

Cubans have received favorable treatment from the United States ever since Fidel Castro took control of the island and declared it a communist ally of the Soviet Union. Congress passed the Cuban Adjustment Act in 1966 that allowed the tens of thousands of Cubans who had already fled Castro’s revolution to gain legal status in the U.S.

When the Soviet Union collapsed in 1991, it left Cuba in economic ruin, prompting tens of thousands of Cubans to take to the sea for the United States on makeshift boats and rafts. As more Cubans took to sea, President Clinton decided in 1995 to enact the “wet foot, dry foot” policy that was used to end the rafter crisis.

Rumors of the end of the policy have been rampant in Cuba since the 2014 rapprochement between the two countries, prompting a surge of Cubans fleeing for the United States. In the year before Obama and Cuban President Raúl Castro announced the opening, 24,278 Cubans reached the U.S. That number nearly doubled in 2015 and climbed to 46,635 in the first 10 months of 2016, according to the Pew Research Center.

Many Cubans continue traveling to the U.S. by sea in rickety, dangerous boats built using spare parts in Cuba. But in recent years, more have taken advantage of laws that allow them to travel to Ecuador, where thousands have started the long, dangerous land voyage across Venezuela, Central America and Mexico to reach the southwest border.