Mexican President Felipe Calderon said Thursday that his brief visit to Cuba was a "re-encounter" between two nations whose long history of friendship has hit some bumps in recent years.

The morning after meeting with Cuban President Raul Castro and other top officials, Calderon said the two men discussed cooperation in the petroleum sector, and oil officials from the two countries signed a non-binding letter of intent to work together.

State-run Petroleos Mexicanos, or Pemex, will "evaluate the possibility of participating and investing in the exploration and exploitation of hydrocarbons in Cuba in the blocs adjacent to Mexico's exclusive zone," Calderon said.

They also agreed to boost sporting and health exchanges, and discussed Mexico's opposition to the 50-year-old U.S. economic and financial embargo against Cuba.

"These have been two extraordinary days for Cuba and for Mexico in that their mutual affection has been rediscovered," Calderon told reporters at the Havana airport before continuing a tour that will take him to Haiti and a regional summit in Colombia.

The Mexican president, whose six-year term ends later this year, said in 2006 that he would improve troubled ties with Cuba, but his planned trip was delayed until now.

In 2009, Fidel Castro alleged that Mexico was holding back information about the swine flu outbreak. The following year the former Cuban leader suggested that Calderon had actually lost his 2006 election to leftist Andres Manuel Lopez Obrador, who called the vote fraudulent.

The two countries temporarily recalled their ambassadors in 2004 after Mexico, under Calderon's predecessor, Vicente Fox, voted in favor of a U.S.-backed condemnation of the human rights situation on the island.

In the 1990s, then-President Ernesto Zedillo suggested during a summit on the island that Cuba needed to change.

Those diplomatic tiffs contrasted with the many years of warm ties following the 1959 Cuban Revolution, when the PRI political party that ruled Mexico for seven decades until 2000 resisted U.S. pressure to break ties with Cuba.

Earlier Thursday, Calderon paid a call on Havana Roman Catholic Cardinal Jaime Ortega.

A statement released by the Mexican presidency said Calderon "recognized the important role of the Cardinal as an interlocutor for the Cuban government to tackle sensitive issues of Cuban reality," an apparent allusion to the church's efforts in 2010 to broker the release of dozens of imprisoned dissidents.