Morocco's Islamist party dominated this North African kingdom's urban areas in local elections, but trailed in total seats behind two parties with strong backing in the countryside, according to final results announced Saturday.
The elections were seen as an important test of the popularity of the Islamist-led government which came to power after the pro-democracy demonstrations of the 2011 Arab Spring.
The councils manage local affairs in conjunction with state-appointed officials and are being strengthened under a new government policy of regionalization.
Some 30,000 local council seats and 700 regional council seats were contested by more than 140,000 candidates from at least 30 parties. The ministry reported a turnout of 53 percent.
The Party of Authenticity and Modernity took 21 percent of the seats, some 6,655 seats, while the conservative Istiqlal (Independence) Party took 5,106 seats, or 16 percent of the total. Those parties rely heavily on prominent figures in the countryside to mobilize votes.
The PAM was created in 2008 by one of the king's counselors and it dominated local elections the following year.
It fared poorly, however, in the 2011 parliamentary elections amid Arab Spring-inspired calls for reform. Those elections were dominated by the Islamist opposition party that went on to form a government.
The Istiqlal is one of Morocco's oldest parties and fought for independence from France and in recent years has been closely aligned with the palace.
The Islamist Party for Justice and Development took just under 16 percent of the seats, 5,021, winning control of councils in the main cities of Casablanca, Tangiers, Rabat, Fez and Agadir as reflection of its strong urban base.
Unlike their counterparts elsewhere around the region, Morocco's Islamists have played down religious issues in their campaigns and preferred to focus on combatting corruption and unemployment.
The party, and its charismatic leader Abdelilah Benkirane, have preserved their popularity despite implementing austerity measures and cutting energy subsidies in order to reduce the budget deficit.