(This version of the story corrects the spelling of the name of adviser in paragraph 2)
By Aziz El Yaakoubi
RABAT (Reuters) - Morocco's King Mohammed has accused a minister of dragging the monarchy into the campaign for October's legislative elections after the official described a key royal adviser as the incarnation of "authoritarianism".
The palace's statement was a rare public defense of the adviser Fouad Ali El Himma, the king's close friend, seen by critics as a symbol of an establishment ill at ease in sharing power with Islamists and other independent political parties.
- PHOTOS: New art and old relics at Mickey Mouse's NYC gallery 25 Pictures
- PHOTOS: See Yes on 3 supporters react to historic transgender rights Question 3 win 11 Pictures
The parliamentary ballot on Oct. 7 will be only the second vote since the kingdom adopted constitutional reforms designed to calm protests by sharing some power during the uprisings in 2011 that toppled leaders in Libya, Egypt and Tunisia.
The ruling Islamists party, the Justice and Development party or PJD, is looking to solidify its position in a system where the king still holds ultimate power.
The PJD, and its junior ally the Socialism and Progress Party (PPS), have accused the establishment of favoring Authenticity and Modernity Party, or PAM, the PJD's main rival.
The palace accused Nabil Benabdallah, the PPS housing minister, of "tarnishing the nation's reputation and the credibility of its institutions" over comments in which he was quoted as referring to PAM's founder as authoritarian.
The party was created in 2008 by El Himma to counter the Islamists. He resigned when he was criticized as a symbol of corruption in 2011. He later become a royal adviser.
"The royal cabinet wants to remove any doubt regarding that statement and its dangerous and important character, mainly as it came from a member of the government," the palace said referring to Benabdallah's comments in a Moroccan newspaper published few days ago.
"That statement contradicts the constitution and the laws that define the relationship between the monarchy and other national institutions including political parties."
Benabdallah could not immediately be reached for comment.
Critics say Morocco is letting slide the freedoms King Mohammed promoted as a concession to the protesters, by putting pressure on activists and politicians who were empowered by the new constitution guaranteeing freedom of speech.
Nearly 30 parties are contesting the vote, with mostly similar platforms such as fighting corruption and ending privileges, but none directly challenge the king's powers.
Other leftists and the largest Islamist group, harsher in their criticism of the monarchy, have been boycotting the political process.
The PJD has long portrayed itself as a fighter against corruption and the old guard that has controlled Morocco's politics and economy since independence from France in 1956.
During its years in power, the PJD-led coalition made structural reforms, in particular in public finances, a priority, cutting the budget deficit, overhauling a cumbersome subsidy system and freezing public sector jobs.
The PJD does not openly challenge the king's authority and its leader was named prime minister by the palace. But it made gains in local elections last year to control Rabat and other major cities, and is popular for its anti-corruption drive.
(Editing by Patrick Markey and Alison Williams)