By Samia Errazzouki
RABAT (Reuters) - After six months of post-election deadlock, Morocco's King Mohammed VI on Wednesday named a new cabinet led by the main Islamist party, which lost a key ministry after protracted negotiations with rivals in the ruling coalition.
The Islamist Justice and Development (PJD) party won elections in October, but the formation of a government was delayed during wrangling with parties who critics say were too close to royalists uneasy with sharing power with Islamists.
Under Moroccan law no party can win an outright majority in the 395-seat parliament, making coalition governments a necessity in a system where the king holds ultimate power despite ceding some authority during protests in 2011.
The PJD's Saad Eddine El Othmani, a former foreign minister, was appointed premier last month by the king to replace PJD leader Abdelilah Benkirane, after his efforts to form a government had been frustrated.
The new cabinet includes members from six political parties.
The PJD, the National Rally of Independents (RNI), the Popular Movement (MP), and the Party of Progress and Socialism (PPS) were in the last government.
Also part of the new cabinet are the Constitutional Union (UC) and the Socialist Union of Popular Forces (USFP), whose participation became a source of conflict between Islamists and the rival RNI party, led by a close friend of the king.
MAP state news agency said several key ministerial posts remain unchanged and under the control of the RNI, which clashed with the PJD during party talks over its insistence on including the USFP in the coalition. The PJD had resisted under Benkirane.
Aziz Akhannouch, RNI leader and a close friend of the king, remains Minister of Agriculture and Fisheries. RNI members Mohammed Boussaid and Moulay Hafid Elalamy remain heads of the Ministry of Finance and Economy and Ministry of Trade and Industry, respectively.
Abdelouafi Laftit, former governor of Rabat and opponent of the PJD, was named Minister of Interior. Former interior minister, Mohammed Hassad, whose tenure saw a testy relationship with Benkirane, was appointed Minister of Education.
The PJD lost its control of the key Ministry of Justice and Public Freedoms, previously led by Mustafa Ramid, who had been critical of the security service's record during his days as a lawyer and human right activist.
He will remain as Minister of State in charge of human rights.
Critics say since the 2011 reforms, royalists have tried to push back Islamist influence. Dismissing claims of royal interference, the palace says the king maintains an equal distance from all parties.
At the heart of the months-long political crisis were questions about the future direction of the PJD, the region's last remaining Islamist party in power after the Arab Spring, and its relations with the palace.
Last month, members of the PJD's national council met to discuss the party's next steps following the replacement of Benkirane. As party members gathered, Othmani's modest arrival was eclipsed by Benkirane, who received a hero's welcome.
For some members of the PJD, Benkirane's removal was a reflection of resentment toward him personally by other leaders, wary of his charisma.
Benkirane has said his party is living through a tough moment because of divisions over what some party members described in the local media as Othmani's failure to fully consult with the party's leadership on the cabinet makeup.
"Whatever may be said about Benkirane now regarding how he approached negotiations, he did maintain a certain advantage in that he refused ... any position that would weaken his party's agenda," said Intissar Fakir, editor-in-chief of Carnegie's Sada Journal.
Abdelali Hamieddine, member of the PJD's general secretariat posted in a tweet before Wednesday's cabinet announcement that a certain "critical distance from Othmani's government is needed".
(Reporting by Samia Errazzouki; Editing by Patrick Markey and Andrew Bolton)