RABAT (Reuters) - The Moroccan royal palace said on Tuesday that King Mohammed VI will meet Spanish Prime Minister Pedro Sanchez on Thursday in Rabat, as the two countries seek to patch up a diplomatic dispute that flared last year.
Spain is Morocco's main trading partner. The two countries have worked together on issues including migration, militancy and energy.
Relations have improved between them after Spain announced last month its support for Morocco's autonomy plan "as the most serious, realistic and credible basis for settling the dispute" over Western Sahara.
The language reflected a shift in Spanish policy in favour of Morocco's claim to Western Sahara, a former Spanish colony that Morocco considers its own but where the Algeria-backed Polisario Front seeks to establish its own state.
In April last year, Morocco was angered after Spain admitted Polisario leader Brahim Ghali for medical treatment, saying it had not been informed.
Morocco warned that if Ghali left Spain, where he faced human rights charges, without a trial it could cut diplomatic ties.
Rabat then appeared to relax border controls with Ceuta, a Spanish enclave in northern Morocco, leading to an influx of at least 8,000 migrants, most of whom were later returned.
The Spanish support for the autonomy plan comes after similar positions by the United States, Germany, France, Israel and other countries in Africa and the Arab world.
Rabat says its 2007 autonomy initiative is the most it can do as a political solution to the conflict.
The Polisario and its ally Algeria reject this and insist on holding an independence referendum.
The United Nations has stopped referring to the referendum option, urging parties to the conflict to negotiate in a spirit of compromise towards a "mutually acceptable solution".
(Reporting by Ahmed Eljechtimi; Editing by Hugh Lawson and Emelia Sithole-Matarise)