Rows of figures in traditional hooded white Moroccan robes advance in unison under the blazing sun to where the king, surrounded by his courtiers, is seated on a black pure-bred horse shaded by a burgundy parasol. The quasi-religious ceremony has a medieval feel at odds with Morocco's self-proclaimed emergence as a modern democracy.

Every year, hundreds of civil servants and elected officials from all over the country must gather at one of King Mohammed VI's palaces to pledge allegiance to the "Commander of the Faithful" in a tribute that critics say is increasingly outdated. The subservience points to the contradictions in a nation that quelled Arab Spring protests by promising the people a greater voice.

"God blesses you, my ruler says unto you," shouted a servant as the elected officials and local bureaucrats bowed deeply at the waist three times in rapid succession before scurrying out of the way and letting the next rank of white-robed officials approach the king. As each rank withdrew a servant intoned "God blesses the age of my ruler."

The sensitivity surrounding the annual ceremony, which was held this year on Aug. 21, was evident by the state's reaction to a small protest against it in front of parliament the next day. Riot police with truncheons charged the few dozen protesters chanting "long live the people" instead of "long live the king." A journalist was beaten and police pursued the protesters into the nearby train station.

The violent behavior of security forces was in stark contrast to most other protests in Morocco during the past year of Arab Spring, which were allowed to proceed, suggesting that criticism of the king remains a red line.

One needs look no further than Great Britain's recent lavish celebrations of Queen Elizabeth's diamond jubilee for examples of the pomp and circumstance of other monarchies around the world. But in Morocco, where the king still holds real power in a country with low literacy and high poverty, these displays are a key part of proving the crown's authority.

Morocco has been hailed as an Arab Spring success story, where the king promoted constitutional reforms and early elections that defused the protests that swept much of the region. The North African kingdom of 32 million is a close Western ally and presents itself as a progressive fusion of modernity and tradition that succeeds where the dictatorial Arab republics failed.

Critics maintain that the constitutional amendments, while granting the parliament and prime minister greater powers, still leave a king with ultimate power — as symbolized by events like the annual ceremony of allegiance.

"It all looks like a prayer — it gives a divine sense to the king," complained activist Zeinab Belmkaddem of the Feb. 20 activist movement that led pro-democracy protests last year.

She said that while the new constitution no longer describes the king as a sacred figure, true democracy is impossible as long as he occupies such elevated status over the elected officials. "The rituals play a role in this, when the head of the government goes to meet the king, everyone around him is bowing down and kissing (the king's) hand and it condemns the conversation to be one between master and servant."

The ceremony of allegiance has existed in one form or another since the 16th century and was used by Morocco's rulers to assert their primacy over the country on a political and spiritual level as descendants of the Prophet Muhammad, explained Nabil Mouline, a professor at Paris' Sciences-Po Institute and an expert on religion and monarchy in the Middle East.

"Now there is a struggle between this old identity, of the king as the center ... and now the nation as the center of identity," he said, explaining that just in the last few decades Morocco and its people have modernized and change dramatically.

Ahmed Benchemsi, a former magazine publisher in Morocco and now visiting scholar at Stanford University, pointed out in a recent article that, despite the reforms, the new constitution still makes the king "inviolable" and of respect and veneration.

"Versions of this pharaonic performance are repeated regularly throughout the year at various royal reviews and ribbon-cuttings, complete with adoring crowds, bowing servants, and hand-kissing officials, all united in devotion to a monarch blessed with divine potency. Who shall tell the average Moroccan that his sovereign is not sacred anymore?" he wrote in the January edition of the Journal of Democracy.

The minister of religious affairs, Ahmed Toufiq, defended the ceremony recently by comparing it to the oaths of allegiance given the Prophet Muhammad in the 7th century A.D. That prompted the country's largest Islamist group, the banned Justice and Charity Movement, to issue a sharp rebuttal.

"Did the Muslims bow before the Prophet? No, at the time of the Prophet, allegiance was shown by shaking hands," said the group's statement, which accused the palace of "playing with the Muslim religion."

A more moderate Islamist group, the Justice and Development Party, won a plurality in elections prompted by last year's protests, allowing it to form a government under its own prime minister. The result has been a bipolar system of power with the prime minister and his ministers on one hand and the king and his array of counselors forming a kind of shadow cabinet.

The government wants to use the new constitution to limit the king's power. "Our objective is the disappearance of the so-called shadow government," said Foreign Minister Saadeddine al-Othmani in an interview with the Associated Press. "Before it wasn't possible but now with the new constitution, all is clear, the role of the government as well as the role of the king."

The new constitution, however, still makes the king the final decision-maker with the power to issue his own laws and check any move of the government. And the PJD, as the Islamist party is known, has muted its criticism of the system since coming to power.

The PJD came to power on a platform of creating jobs and fighting corruption, but most experts say the roots of the problem run right up to the highest levels of power and include those linked to the monarchy itself.

Several initiatives by the PJD government, including reforming state broadcasting and adding greater transparency in lucrative concessions for transportation, fishing and other sectors, have been blocked.

Part of the challenge for would-be reformers is that the king, whose family has ruled since 1666, remains a popular figure, especially for the large swaths of the population that are poor and uneducated and have been raised on these ceremonies surrounding the monarch that appear on state television regularly.

Abdelaziz Aftati, a member of parliament from the PJD, was not chosen to be part of the delegation wearing white robes and bow before the king. He thinks that's because of his constant criticism of the system.

Aftati maintains that attitudes toward such rituals are changing.

"All of these practices must be reviewed," he said. "Everything that is degrading, such as the bowing and hand-kissing, has to disappear."