Updated

French troops will take part in a future U.N. peacekeeping mission in Mali after they end their task of clearing Al Qaeda-linked rebels out of Mali's vast northern region.

French President Francois Hollande made the announcement Thursday as he spoke before Morocco's parliament, part of a two-day visit celebrating the two nations' close cooperation.

"France will soon complete its mission (in Mali) in a few weeks and African forces will take over. The security council is going to deploy a peacekeeping operation and France will play its part," Hollande said.

He said that scenario was based on the condition that a "indispensable" dialogue take place between Mali's factions and the Mali government in Bamako and on the resumption of the democratic process in the West African nation.

Elections in Mali are planned for July.

Mali was plunged into turmoil after a coup in March 2012 created a security vacuum. That allowed secular rebel Tuaregs, who have long felt marginalized by Mali's government, to take half of the country's vast north as a new homeland. But months later, their struggle was co-opted by Islamic jihadists, who imposed strict Shariah law in the north.

France launched a military operation on Jan. 11 against the Islamic extremists, many linked to Al Qaeda, after they suddenly started moving south and captured key towns. Backed by Chadian soldiers, French troops ousted the radical Islamic fighters from major towns in northern Mali, though many went into hiding in the desert and continue to carry out attacks.

Hollande said last week the first of France's more than 4,000 troops in Mali will pull out in late April and by July, will be down to 2,000 soldiers. He said just 1,000 will remain by the end of the year.

Hollande also took the opportunity to describe Morocco's autonomy plan for the Western Sahara region it annexed beginning in 1976 as "credible."