Syrian thugs have overrun our embassy in Damascus. Women can’t drive in Saudi Arabia. Egypt is on tenterhooks again with a rise in anti-Semitism and violence against Christians.Libya is at war. It’s enough to make the most optimistic freedom advocates gloomy.

But there are bright spots. As I reported previously, Morocco’s king gave an extraordinary speech last month presenting a new constitution. On July 1, the country voted overwhelmingly to ratify it.

But Driss El Yazami, the head of the new independent human rights watchdog agency in Morocco and a participant in the constitutional reform process, knows there is a difference between what is on paper and what exists in the real world. In an interview in Washington, he told me that reforms in Morocco didn’t begin with the Arab Spring. “The rhythm of progress was slow but there was progress,” he said, pointing to steady reforms under the previous and current kings, including a revolutionary Family Code enacted in 2004 that provided for legal equality for women. But certainly the Arab Spring and a series of peaceful demonstrations in Morocco accelerated the pace of reforms.

El Yazami offered two theories for Morocco’s progress. One, he suggested, is that “the Moroccan Spring pushed the king to accelerate reforms.” Alternatively, the king may have “seen an opening” to push for items that had been part of his agenda.

El Yazami said the human rights council that he heads, which was formed in March, is intended “to give a platform for the filing of claims if Moroccans’ rights have been violated. It has the power to investigate and to ask every institution to give information.” He said his group will have access to police stations, prisons, orphanages and other institutions. But the task here, as with the development of an independent judiciary (another element of the constitutional reform), is two-fold.

First, Moroccan authorities need to be trained in every area of public life, he said. “Judges,” he explained, “are trained in Arabic. So their access to international law — to common law and to French law — is limited. In the past they had access to international jurisprudence.” Likewise, in law enforcement, police and other officials need to understand what the rule of law entails. “Authorities now have to recognize they have citizens who know their rights.”

Part of that effort to enforce limits on governmental entities can be achieved, El Yazami suggested, by the new constitutional provision which makes clear that Moroccan law must not violate international law and must prohibit discrimination (listing, remarkably for a Muslim country, Jews as a protected group). Why make the government subservient to international strictures? “Our government needs to know that human rights violations are forbidden. We need to insist upon it.”

But the second task is even more daunting perhaps. Moroccans need to make the journey from subjects to citizens. El Yazami told me, “The rule of law needs citizens claiming their rights and applying the law.” For example, the new constitution will give parliament the power to legislate in new areas. Will lawmakers take advantage of that? The human rights council is set up to receive complaints of mistreatment, but will Moroccans step forward to report abuses? In a real sense, this is an reenactment of the journey Eastern European countries made when they threw off the shackles of communism. Passivity and contempt for the regime had to be replaced by private activities, insistence on enforcement of the law and exercise of power by new entities to which power is to be devolved.

It is an enormous undertaking made more complicated by a fragile economy. El Yazami is blunt: “Morocco is a poor country.” Tourism has dropped off. He jokes, “For Europeans, all these Arabs are the same, so they’ll change their holiday plans to go to Croatia.”

A combination of technical assistance and foreign development is essential for progress to continue. The hope is that foreign investors will be enticed by, among other things, a reformed judiciary and a reliable legal system.

Finally, I ask him about the progress of women who will be guaranteed not only equality but “parity” (that is, equal numbers in government bodies). Underneath the legal reforms, he said, there has been a social revolution going on. “Twenty years ago you wouldn’t see a Moroccan woman working in a cafe.” Now it’s commonplace. The change in the status of women is “shaking up society,” he said.

That all of this should be going on as violence, revolution and instability swirl in the Maghreb and in the Middle East is remarkable. It’s not necessarily the case that the experience can be duplicated elsewhere. But it does defy expectations of many (both on the right and the left in the United States) that Muslims can’t practice democracy or cannot tolerate liberated women. Perhaps the U.S. and the West more generally should be asking Arab allies in the region, “If Morocco can do it, why can’t you?”