Cuba and Morocco has signed an agreement to reestablish diplomatic ties after a gap of 37 years, the Cuban Foreign Ministry said in a statement.
"Guided by the mutual will to develop friendly relations, the two governments agreed to reestablish ties as well as political, economic and cultural cooperation," said the agreement, signed on Friday by the two countries' envoys to the UN in New York.
Relations will be restored with ambassadors being exchanged, Xinhua news agency reported.
Morocco's King Mohamed VI has already ordered the opening of an embassy in Havana, one of the few Latin American capitals where Rabat was not represented to date.
Morocco cut ties with Havana in 1980 after Cuba recognised Western Sahara as the independent Sahrawi Arab Democratic Republic. Morocco claims the territory as its own.
King Mohamed VI travelled to Cuba earlier in April for a private family visit, but it was widely believed that he maintained diplomatic contacts with the Cuban government during his stay there.