A Moroccan woman walks past electoral paintings representing a political party logos for the upcoming municipal elections in Casablanca, Morocco, Wednesday, Oct. 5, 2016 (Photo: AP)
Moroccans went to the polls on Friday to elect a new parliament, five years after an Islamist-led government took office following Arab Spring-inspired protests that toppled regimes across the region.
The Islamist Justice and Development Party (PJD) aims to fight off a liberal opposition which says it wants to roll back the "Islamisation" of Moroccan society.
But the real power will remain in the hands of King Mohammed VI, the scion of a monarchy that has ruled the North African country for 350 years.
Early turnout was low at polling stations in the capital visited by AFP but many people said they would wait until after the main weekly Muslim prayers at midday to go and cast their vote.
Polls were due to close at 1800 GMT with first results expected on Friday evening.
The PJD came to power in 2011, months after massive street protests prompted concessions from the monarchy.
A new constitution transferred some of the king's powers to parliament, at a time when autocratic regimes were falling in other North African states.
Prime Minister Abdelilah Benkirane's PJD heads a coalition including communists, liberals and conservatives.
The party says a second term would allow it to press ahead with its economic and social reforms.
While in government, it passed a controversial reform of the retirement system and followed a relatively liberal economic policy.
Its task has been complicated by the unstable world economy and a drought this year that has hit Morocco's vital agricultural sector and sent growth plummeting.
It has also been weakened by rising unemployment and what critics say is a failure to make good on promises in 2011 to tackle corruption.
The party has also faced a string of scandals within its ranks including a drugs bust, a land-grab deal and the suspension of two vice presidents found in a "sexual position" on a beach.
The PJD is, however, credited with lowering the budget deficit, and is popular among the urban middle classes which have largely abandoned the secular left.
It is weaker in rural areas, where a drought has ravaged the country's all-important agriculture sector and hit farmers' incomes.
The liberal opposition Authenticity and Modernity Party (PAM), formed in 2008 by a close adviser to the king, hopes to take advantage.
Headed by Ilyas El Omari, it has poured enormous resources into a campaign criticising the government's economic record as "catastrophic" and pledging to roll back the "Islamisation" of society.
The PAM, which wants to legalise cannabis, aims to bring more women into parliament, where they hold just 67 out of 395 seats.
Several parties have fielded ultra-conservative Salafists, in a sign that Islamists are becoming a feature of Moroccan politics.
Around 16 million Moroccans are eligible to vote, with 30 parties competing for seats. Turnout will be a key factor, after it reached only 45 percent in the November 2011 polls.
A list system and an electoral threshold that has been halved from six to three percent could hand small parties a key role in forming the next government.
The PJD and the PAM have ruled out joining forces in a coalition.
Under the 2011 constitution, the king appoints a prime minister from the biggest party in parliament once the election results have been announced.
He remains the decision-maker on long-term and strategic issues including foreign policy and major infrastructure projects, said Riccardo Fabiani, a North Africa analyst.
"Parliament and government are free to choose the policies as long as they are compatible with the monarchy's preferred approach," he wrote in an article for the Carnegie Endowment for International Peace.