HAVANA (Reuters) - Cuba’s new president, Miguel Diaz-Canel, began his term on Thursday with a promise to defend the socialist revolution led by the Castro brothers since 1959, giving a sober speech that also emphasized the need to modernize the island’s economy.

A stalwart of the ruling Communist Party, Diaz-Canel was sworn in to replace Raul Castro by the National Assembly in a carefully managed new chapter for the Caribbean island, aimed at preserving the political system.

“The mandate given by the people to this house is to give continuity to the Cuban revolution in a crucial historic moment,” Diaz-Canel, 57, told the assembly in his first speech as president.

He delivered a warm homage to 86-year-old Raul Castro, who took office a decade ago as his brother Fidel Castro’s health deteriorated. Fidel Castro died in 2016.

Castro will retain considerable clout as the head of the Communist Party until a congress in 2021. Diaz-Canel, praising the reforms he ushered in as president, said Castro would remain the leader of the revolution and would be involved in major decisions.

Stepping to the podium for a 90-minute-long parting speech, a relaxed-looking Castro gave the impression he would not quickly fade from sight. He sharply criticized U.S. foreign, trade and immigration policy under President Donald Trump.

“Since the current president arrived in office, there has been a deliberate reversal in the relations between Cuba and the United States, and an aggressive and threatening tone prevails,” Castro said.

Thursday’s session was held on the 57th anniversary of Cuba’s 1961 defeat of a CIA-backed Cuban exile invasion at the Bay of Pigs, a victory that Havana celebrates as a symbol of its resistance to “imperialist” pressure for change from Washington.

In 2014, Castro and former U.S. President Barack Obama reached a landmark agreement to renew diplomatic ties and improve relations between the Cold War foes, a detente that led to a rapid increase in U.S. visits and investment on the island.

There has been a renewed chill under Trump, who put a stop to doing business with some Cuban state-run companies and tightened rules for U.S. visitors. A spate of mystery illnesses among U.S. diplomats in Havana has also undermined trust.

Despite that, Diaz-Canel praised Castro’s move to renew relations with the United States. He said there would be no compromise in Cuba’s foreign policy but in a repetition of a long-held stance by Havana, he said he would hold dialogue with anybody who treated Cuba as an equal.

“I take that as a signal that the Cuban leadership still sees value in improving relations, even if they have to wait for the next U.S. president,” said William LeoGrande, co-author of a book on the secret U.S.-Cuba talks that led to detente.

In Washington, a White House official said the Trump administration had no expectations Cuban people would have any greater freedoms under the new “hand-picked” leader, and had no intention of softening its policy toward the island’s government.

Slideshow ( 9 images )

Castro spoke highly of Diaz-Canel and gave his blessing to the younger man to take over from him as the powerful head of the Communist Party in three years. He also said the new president could serve two five-year terms, underscoring restrictions Castro imposed on himself after his brother’s decades in power.

SWEEPING CHANGES NOT EXPECTED

Diaz-Canel’s speech set a course for his first term, in which he will have to strike a balance between defending Cuba’s socialist system and reforming it enough to satisfy a young generation hungry for better economic conditions.

Slideshow ( 9 images )

He confirmed expectations the transition would not herald sweeping changes to one of the world’s last state-run economies and one-party systems, promising there would be no return to capitalism.

Diaz-Canel, who has risen the ranks of the Communist Party over three decades, said the new period would also be characterized by “modernization of the economic and social model,” without giving details.

He ended his speech like Fidel Castro used to, punching the air and shouting the revolutionary slogans “motherland or death, socialism or death, we will win.”

Of the 604 lawmakers present, 603 voted in favor of making Diaz-Canel president and unanimously for the other mainly middle-aged members of the state council, marking a generational shift from the elderly leaders who fought to topple U.S.-backed dictator Fulgencio Batista in 1959.

ECONOMIC HARDSHIPS

For many Cubans, struggling with economic hardships and frustrated with the government’s emphasis on continuity rather than change, the transition was seen as unlikely to bring much beyond the symbolism of a new leader.

“He talked much about the past, nothing about the future and practically nothing about the present,” said Monica Rivero, a 29-year old Cuban journalist based in Havana.

Cubans hope the next government can breathe life into the Soviet-style centrally planned economy, which has failed to improve much under Castro’s limited market reforms. Those reforms have included allowing small businesses from hairdressers to restaurants, and encouraging some foreign investment.

In his speech, Castro reiterated his support for the reforms and for self-employment. He called for more austere government spending and responsibility over the country’s debt, but said a plan to unify the nation’s two currencies was causing “a headache.”