Ministers from the Istiqlal party quit Morocco's Islamist-led ruling coalition on Tuesday, a spokesman for the conservative party told AFP, threatening a government shakeup or snap elections.

"It's official, our ministers have just presented their resignation to the head of the government (Abdelilah Benkirane)," Istiqlal spokesman Adil Benhamza said.

Of the six ministers from the party, only one, Education Minister Mohammed El-Ouafa, had yet to present his resignation by Tuesday evening.

Benhamza said that if he failed to do so within 24 hours, "he will be excluded" from the party.

Istiqlal's national council first threatened in May to quit the government over its failure to shore up the economy and solve pressing social problems.

Istiqlal held several ministerial posts, including education and the economy, and its withdrawal will force the moderate Islamist Party of Justice and Development (PJD) to find a new coalition partner or face early elections.

The PJD has led the government since it emerged as the largest party after elections in late 2011.