Soviet leader Mikhail Gorbachev ended a three-day visit to Cuba Wednesday, during which he criticized attempts to export revolution, assailed U.S. policy in Nicaragua and praised President Fidel Castro as "a man of legendary destiny."

Gorbachev inspected an honor guard at Jose Marti Airport, met with dignitaries on the tarmac and shook hands with flag-waving, cheering Cubans held back by barricades, before boarding his Aeroflot jetliner and flying to London for talks with Prime Minister Margaret Thatcher.The Soviet leader, winding up his first visit to Latin America, drove with Castro from the presidential palace to the airport along streets lined with crowds hoping to catch a glimpse of the procession.

In London, Gorbachev is expected to discuss arms control and human rights issues with Thatcher and other government officials on his third visit to Britain. Gorbachev told ABC News Wednesday, "I think the problems discussed will be very serious. They're always serious and intensive talks with Mrs. Thatcher."

Addressing a special session of the Cuban legislature, the Assembly of People's Power, Gorbachev thanked Cubans Tuesday for their friendly welcome, congratulated them on a common socialist background and spoke at length on the prospects for Latin American peace and economic cooperation between the Soviet Union and the region.

Gorbachev said in his address to the Cuban legislature, "There is the prospect of a conflict (in Nicaragua). The agreement at the conference of the heads of state of government in Latin America has laid down the prospect for peace.

"We advocate a peaceful solution to the situation in Central America. We believe that all interested parties should contribute to this solution without interference, and in full respect of the rights of all states to decide on their own destiny."

Gorbachev also reiterated a pledge that the Soviet Union has no intention of establishing a military presence in Latin America.

In Washington, State Department spokeswoman Margaret Tutwiler said Secretary of State James Baker "has taken particular note" of the remarks by Gorbachev and other Soviet officials that Moscow opposed the export of revolution and counterrevolution.

The State Department has accused Cuba of supplying arms to leftist guerrillas in El Salvador and has charged Nicaragua with acting as a conduit and training base for Salvadoran leftist rebels.

"These words certainly represent new thinking," Tutwiler said. "Now the United States and the democracies of this hemisphere will look for deeds to match these words."