HAVANA (Reuters) - Cuban President Raul Castro harshly criticized U.S. President Donald Trump’s immigration, trade and other policies on Sunday as Trump reviews a fragile detente with Communist-run Cuba begun by his predecessor Barack Obama.

In his first critical remarks directed at Trump since he took office, Castro termed his trade policies “egotistical” and his plan to build a wall along the Mexican border “irrational.”

Castro’s speech to a summit of leftist leaders in Venezuela was broadcast by state-run television on Sunday evening.

Before taking office, Trump threatened to torpedo the detente between the former Cold War foes unless a “better deal” could be struck, without providing details.

The White House said last month it was in the middle of “a full review of all U.S. policies toward Cuba.”

Castro said: “The new agenda of the U.S. government threatens to unleash an extreme and egotistical trade policy that will impact the competitiveness of our foreign trade; violate environmental agreements ... hunt down and deport migrants.”

He said migration was due to growing inequality and poverty caused by an unjust international economic system and that a wall along the Mexican border was therefore “irrational” and aimed at all Latin Americans, not just Mexicans.

“You can’t contain poverty, catastrophes and migrants with walls, but with cooperation, understanding and peace,” Castro said.

Seeking to reverse more than 50 years of U.S. efforts using isolation to force Cuba to change, Obama agreed with Castro in December 2014 to work to normalize relations.

The two close neighbors have since restored diplomatic ties and signed cooperation agreements.

Trump said last month after having dinner with Florida Senator Marco Rubio, a vociferous foe of detente, that he and Rubio had similar views concerning Cuba.

Obama, a Democrat, used executive orders to circumvent the longstanding U.S. trade embargo on Cuba and ease some restrictions on travel and business. The embargo can only be lifted by the U.S. Congress, which is controlled by Republicans.

Travel to the Caribbean island from the United States has increased, with the start of direct flights and cruises and roaming agreements signed, but no manufacturing or significant trade deals have yet been agreed.