Photo: Religious officers led a youth onstage before a public whipping in Banda Aceh, Indonesia, in August. The youth was punished for dating outside marriage, which is against Shariah, or Islamic law. Credit Chaideer Mahyuddin/Agence France-Presse — Getty Images

BANDA ACEH, Indonesia — Things were hopping at Redinesh Coffee Roastery in this seaside city one recent evening. Electronic dance music blared from the cafe’s speakers as patrons, some in ripped jeans and fashionable spectacles, sat outside drinking locally sourced coffee and smoking cigarettes.

But then the Muslim call to prayer sounded, and a waitress hurriedly ushered everyone back into the cafe. She turned down the music, closed the doors and covered the windows. It was the Maghrib — the second to last of the five daily calls to prayer — and outdoor socializing had to cease.

Aceh Province, on the northern tip of Sumatra island, stands alone in having formally established Shariah law in Indonesia, a Muslim-majority country with a relatively secular Constitution. In Aceh, women are required to dress modestly, alcohol is prohibited, and numerous offenses — from adultery to homosexuality to selling alcohol — are punishable by public whipping.

Aceh (pronounced AH-chay) began its experiment with Shariah in 2001, after receiving special authorization from Indonesia’s central government, which was intent on calming separatist sentiment in the deeply conservative region. Now, Shariah police officers roam the province, raiding everything from hotel rooms to beaches in a hunt for immoral activity.

In the decade and a half since, Indonesia as a whole has drifted in a conservative direction, and Aceh, once an outlier, has become a model for other regions of the country seeking to impose their own Shariah-based ordinances, alarming those who worry about the nation’s drift from secularism.

“Whenever Aceh issues a law, saying it’s the highest order of Shariah, it provokes others to do the same thing,” said Andy Yentriani, a former commissioner on Indonesia’s National Commission on Violence Against Women, who wants the national government to repeal certain Shariah-based regulations as violations of the Indonesian Constitution.

A recent study found that more than 442 Shariah-based ordinances have been passed throughout the nation since 1999, when Jakarta gave provinces and districts substantial powers to make their own laws. These include regulations concerning female attire, the mixing of the sexes and alcohol.

Photo: Officers destroyed alcohol in Banda Aceh in March. Alcohol is prohibited in the region, and selling it is punishable by whipping. Credit Hotli Simanjuntak/European Pressphoto Agency

But for local officials, the spread of Shariah from Aceh is a point of pride, and delegations from areas with a history of embracing conservative Islam regularly visit to see how it has been carried out here.

“They look at how we facilitate an atmosphere of religiosity,” said Syahrizal Abbas, the head of Aceh’s Department of Shariah, who said he gives visiting delegations advice on how to incorporate Shariah teachings into law. Mr. Syahrizal, who is considered a moderate, said that Aceh’s version of Shariah was softer than that of the oft-maligned form in Saudi Arabia, because it welcomed alternative schools of Islamic thought and accepted the role of female leaders.

Indeed, Banda Aceh, the province’s capital, is currently led by Illiza Sa’aduddin Djamal, the city’s first female mayor. Many activists for women’s rights say they supported her candidacy in hopes that she would be a progressive leader. Instead she has proved to be a zealous, hands-on enforcer of Aceh’s conservative moral code, issuing a nighttime curfew for women and personally dispersing events deemed to contradict Shariah.

Last February, Ms. Illiza, wearing a black head scarf, strode into the hall where Indonesian Model Hunt, a beauty competition, was underway, interrogating cowering models about the event as news cameras rolled.

“Why aren’t you wearing a jilbab?” she asked one, referring to what Indonesians call a head scarf. The Shariah police loaded the competition’s trophies into a bag and escorted models out of the building.

“Shariah right now is about what someone’s wearing,” said Ratna Sari, the head of the Aceh branch of Solidaritas Perempuan, a women’s rights organization, who said she longed for a version of Shariah that tackled political corruption and promoted good public services. “Where are all the Islamic hospitals?”

Shariah was imposed here in 2001 toward the end of Aceh’s decades-long struggle for independence from Jakarta. Scars remain from the war, as well as the aftereffect of the Indian Ocean tsunami that killed 230,000 people here in 2004. Today Aceh is one of Indonesia’s poorest provinces, with nearly one in five people believed to be living in poverty.

In February, the Acehnese will go to the polls to select new leaders, but none of the candidates for mayor or governor are willing to challenge the primacy of Shariah law.

Photo : A member of the female Shariah police telling men to go to a mosque for Friday Prayer in Banda Aceh in 2014. Credit Ulet Ifansasti/Getty Images

Irwan Johan, a vice speaker for the Acehnese Provincial Legislature, said any real debate over Shariah was impossible, even though “a silent majority” thinks the government has gone too far.

“They’re not brave enough to say anything,” he said about critics of Shariah. “Talk about issues of religion and you could be expelled, or be considered a person who isn’t really Acehnese. Everybody became a hypocrite.”

Debate over the province’s Islamic identity erupted in December when Indonesia unveiled new currency notes featuring a portrait of a female anticolonial fighter from Aceh. A provincial lawmaker protested that the woman, Cut Meutia, was not depicted wearing a head scarf, even though local historians say that Acehnese women of that era did not generally wear them.

“Many say that according to Shariah she must wear a jilbab, but it’s a historical fact that she didn’t wear one,” Mr. Irwan said.

Photo: The Baiturrahman mosque, the largest in Banda Aceh, in 2013. Credit Hotli Simanjuntak/European Pressphoto Agency

Mr. Irwan remembers a different era in Acehnese history — the 1990s, in his youth, before Aceh gained its special autonomy and instituted Shariah law. “When I was still in high school there were so many discothèques here,” he said. “The discothèques would close at 3 a.m. But at 3 a.m. if we weren’t satisfied yet, we’d go to the beach, and from 3 a.m. to 7 a.m. we’d play disco music with no problem.”

Now, he noted, there are no more discothèques in Banda Aceh, and men and women are told to sit apart during concerts.

“Now Aceh is at its most Islamic,” he said. “It used to not be like this.”

Islamist leaders from outside the province are hoping to push things further here. In late December, Rizieq Shihab, a firebrand preacher who leads the hard-line Islamic Defenders Front, a national organization that led the campaign to have Jakarta’s Christian governor prosecuted on blasphemy charges, gave a fiery speech before a crowd in Banda Aceh.

“When Islam first came to Indonesia it entered through Aceh, correct?” he asked the crowd. “Correct!” the crowd thundered back.

“Aceh is a model for the entire Indonesian nation,” the preacher continued. “It must become the locomotive for the movement to apply Shariah law throughout Indonesia. Agreed?” he asked the crowd.

JAKARTA, Indonesia — Human Rights Watch urged Indonesia on Wednesday to overturn Shariah laws in the conservative province of Aceh, saying the application of the legal code of Islam has resulted in widespread rights abuses.

The New York-based group said in a report that laws policing morality had resulted in violence and sexual abuse by the province’s Shariah police, known as the Wilayatul Hisbah, and by vigilante members of the public.

The laws run against “Indonesia’s own national laws and the constitution” and place Indonesia “in violation of its international human rights obligations, in particular the right to free expression, religious freedom, free association and privacy,” said Elaine Pearson, the deputy director of Human Rights Watch in Asia.

In particular, the group took issue with laws banning “khalwat,” or association between single or unrelated members of the opposite sex, as well as strict Islamic dress codes.

Enforcement of the khalwat law frequently results in detention of up to 24 hours in which men and women found together are often forced to marry and women are compelled to undergo invasive virginity tests, the report said. More than 800 people, including children, were detained last year under the khalwat law, which also carries punishments of caning and fines.

In one case this year, two members of the Wilayatul Hisbah were convicted in the rape of a 19-year-old woman who was arrested while riding on a motorbike with her boyfriend on a secluded road.

The group also said that more than 2,600 people were stopped last year under a law prohibiting un-Islamic dress. Although the wording of the law applies to both men and women, in practice it overwhelmingly singles out women, as well as the poor, the report said.

Shariah law in Aceh has also caused a rise in brutal vigilante justice by the public, with authorities routinely turning a blind eye to mob violence, it said.

Human Rights Watch called on the governor of Aceh, Irwandi Yusuf, to press the legislature to repeal the laws and urged the central government to file an appeal in Indonesia’s Supreme Court on the grounds that they violate the country’s nonsectarian constitution. Mr. Yusuf and his deputy, Muhammad Nazar, could not be reached for comment.

Shariah laws began to be applied in Aceh, a staunchly Islamic province, in 2001 as part of government attempts to end three decades of conflict between Jakarta and the separatist Free Aceh Movement. It is the only region of Indonesia to officially embrace Shariah, although some districts have implemented Islamic-inspired ordinances.

A stricter Shariah code that includes death by stoning for adulterers was passed by legislators last year but the governor has refused to sign it.