Moroccans voted Friday in local polls seen as a test for the ruling Islamists, who swept to power nearly four years ago after Arab Spring protests prompted reforms by the king.
About 15 million people were eligible to vote in the municipal and regional polls, considered a gauge of the popularity of Prime Minister Abdelilah Benkirane and his government, a year ahead of a general election.
Polling stations closed at 1800 GMT and first results were expected later Friday.
In 2011, Benkirane's Justice and Development Party (PJD) became the North African country's first Islamist party to win a national election, and the first to lead a government.
That vote followed concessions from King Mohammed VI, the scion of a monarchy that has ruled the country for 350 years.
A new constitution curbed some, but not all, of the king's near-absolute powers as autocratic regimes toppled in Tunisia, Egypt and Libya.
Previously the monarch could choose his prime minister, but he must now appoint someone from the party that wins the most seats in parliament.
Around 32,000 seats on local and regional councils were at stake in Friday's vote.
Benkirane, who voted in the capital, told AFP "Morocco is taking a decisive step towards democracy".
Habiba Ramzi, a voter in her 80s, said she hopes that those elected "will think about the poor this time.
"To those candidates I say 'enough corruption and lies,'" she said, adding that she wanted to see more done to improve education.
A total of 140,000 candidates are standing, and 76 foreigners are among 4,000 election observers.
Benkirane remains popular in the conservative country, despite limited success in tackling corruption, and is credited with lowering the budget deficit to less than five percent of GDP from seven percent.
Signup to our newsletter and follow us on Facebook and Twitter!
- Challenge of Islamic extremism -
His main rival, Authenticity and Modernity party leader Mustapha Bakkoury, has criticised his rule.
"His priority over the last four years has been his own clan, rather than all the people of the country," said Bakkoury, a close adviser to the king.
While Morocco is considered one of the most stable countries in the region, it faces a challenge from Islamic extremism.
The authorities frequently announce the arrest of "terrorist cells" and report seizing weapons from groups they say have pledged allegiance to the Islamic State group.
With less than half of registered voters taking part in the election of November 2011, Friday's turnout was being closely watched for an indication of the state of political transition.
"In a Morocco that is learning to walk along the path of democracy, participation in elections is not a luxury; rather it is the first step along the road to building the future," independent daily Akhbar Al-Yaoum said.
It said turnout will serve as a key indicator of Morocco's ability to turn towards democracy.
Early turnout was slow in the capital, an AFP journalist said, but most people were expected to vote after weekly Friday prayers at midday.
Official figures from 1600 GMT showed a turnout of 36.5 percent.
Mohamed Madani, a professor of political sciences at Rabat's Mohammed V University, said the elections will serve as a "springboard" for parliamentary polls due next year.
The interior ministry said the election -- boycotted by Morocco's largest Islamist movement, Justice and Charity, and the smaller far-leftist party Democratic Path -- began smoothly.
But the official MAP news agency reported that voting was disrupted briefly in one village north of Marrakesh after eight people entered a polling station and smashed a ballot box.
Other media reported attempts to influence voters at polling stations in the capital as well as in cities including Agadir and Fez.