On Thursday, President Barack Obama said that he terminated the policy of 22 years that allowed Cubans arriving on U.S. soil without visas to stay and be given legal residency. The move was unexpected but long sought by the government of Cuba.

In a statement, Obama said that effective immediately, all Cuban nationals attempting to enter the U.S. illegally and who do not qualify for humanitarian relief are subject to removal, which is consistent with U.S. law as well as enforcement priorities.

Through the taking of this action, we are treating migrants from Cuba the same as we treat migrants from every other country, said a press release from the government.

The move puts a finishing touch on the efforts of Obama as the president to end the more than half century of hostility between Cuba and the U.S. and establish normalized diplomatic relations and ties with the Caribbean island government that prior U.S. presidents have sought to punish and isolate.

The action by Obama will be through a new regulation by the Department of Homeland Security and a deal with the government of Cuba, which Obama said agreed to accept the return of Cuban citizens.

The policy, known as “wet foot, dry foot,” which goes back to 1995, received its name due to its unusual rules that required Cubans caught attempting to reach the U.S. by sea to be sent back to Cuba; yet those who arrived on U.S. soil and were caught, could stay and eventually apply to become a permanent resident.

The policy was a way for the U.S. to attempt to weaken the government of Fidel Castro, through welcoming thousands of Cubans that were fleeing repression.

However, recently it has been a magnet for economic refugees that has enticed many Cubans to take the perilous journey to reach the U.S. where they can enjoy legal status unlike other migrants from other countries.

The recent changes in policy have drawn sharp criticism from Obama’s opponents who argue a thaw in relations with Cuba would reward Cuba’s dictators, and ignore their abuses of human rights.

A New Jersey Democrat Senator Robert Menendez said the announcement made by Obama will serve to tighten a noose that the Castro regime maintains around the necks of its people.

He said that Congress was not consulted on Obama’s move.

A security adviser to Obama said that before most Cubans that came, absolutely needed to leave the country, but today those coming are seeking economic opportunity.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with MarketBeat.com's FREE daily email newsletter.