KARACHI, Pakistan — At 22, Wahabba Husain had never worn a headscarf. As she walked into the classroom at Al-Huda, an all-female Pakistani institute for Islamic studies, on a December afternoon in 2014, she felt a pang of worry.

Would the other women judge her immodest? A bad Muslim?

Husain exhaled when she saw many of her classmates had removed their veils. Her teachers, some as young as she was, had angelic faces. For the next several months, studying the Quran and the life of the Prophet Muhammad among two dozen women every Friday became a haven for her in male-dominated Pakistan.

“I wanted something to feel at peace,” Husain said, lingering over a juice at an upmarket cafe in Karachi. “There is a very big sense of masculinity in this city. The classes are one of the best ways for women to connect with God in a way that is ours.”

Al-Huda – which caters mainly to educated urban women – is the best known of a growing number of female-only academies that form an important outlet in an increasingly conservative country. They offer women a space outside the home to study and socialize while empowering them with a measure of the religious authority long monopolized by powerful male mullahs.

Yet there is a paradox at the heart of the schools’ appeal. Even as they seek to embolden women, many preach an austere interpretation of Islam that segregates the sexes, tolerates unequal gender roles and rejects other strains of the faith – philosophies that critics say contribute to Pakistan’s growing fundamentalism.

TEACHING A U.S. SHOOTER

A former Al-Huda student was Tashfeen Malik, who went on a shooting spree with her husband in December at the Inland Regional Center in San Bernardino, killing 14 people and wounding 21 others. Before the killings, the couple pledged loyalty to the leader of the Islamic State, raising questions about the role Al-Huda might have played in radicalizing Malik during the several months she spent attending classes in the southern Pakistani city of Multan.

It was the first time the school was directly linked to such an attack. Al-Huda’s founder, Farhat Hashmi, a Pakistani-born woman living in Canada, said the organization “denounces extremism, violence and terrorism of all kinds” and should not be held responsible for students’ “personal acts.”

Husain said none of her teachers at Al-Huda – or any other academy – endorsed violence. “I’ve been to all of them and they never taught me anything like that,” she said.

“There are so many girls going to these institutions. If all of them went around shooting … well, the ratio is very, very low.”

Many women say the academies have allowed them to reassert themselves in a society that often feels hostile to their gender. In Karachi, the sprawling port city where Husain lives, violence and lawlessness, combined with a creeping religious orthodoxy, conspire to restrict even many educated working women to roles as wives and homemakers.

Classes taught by women, for women, fill the drawing rooms of the city’s best neighborhoods and banquet halls in five-star hotels, as well as classrooms and more modest venues. Tickets for Quranic lectures are sold at coffee shops and perfume boutiques, aimed squarely at women from the middle class and above.

“It’s an alternative space outside the home or kinship networks that women didn’t have access to earlier, and it’s important that they can justify to their families that it is something noble and religious,” said Faiza Mushtaq, a sociology professor at the Institute of Business Administration in Karachi.

‘I WAS BECOMING MORE RIGID’

One Karachi woman said she began studying Islam in 2000 to cope with the “emptiness” she felt after giving birth to two daughters. Al-Huda drew women from different social classes together, a rarity in stratified Pakistan.

Yet the woman, a journalist in her mid-40s, quit after a few years in frustration over her teachers’ failure to address social issues such as rape and extremist violence.

“I didn’t see anything that advised us to act in a violent way. But it did make people profoundly religious,” she said.

“I sensed that I was becoming more rigid. I was avoiding my husband’s male friends and (avoiding) visiting places that had music. It started to create problems at home.”

Like other women interviewed for this story, the ex-student requested anonymity because she has not disclosed to co-workers that she studied at Al-Huda, which remains controversial despite its popularity. The religious establishment regards Hashmi as unqualified to teach the Quran and her methods as too modern. In liberal and secular circles, she is seen as reactionary and anti-feminist.

Founded in 1994, Al-Huda began as a response to the traditional schooling administered by large Islamist organizations, which many educated women had begun to view as regressive and overly political.

Muslim women have long gathered for informal study circles known as dars. Hashmi, who earned her Ph.D. in Islamic studies from the University of Glasgow in Scotland, created a university-style system with admissions requirements, fixed class schedules, homework assignments and an 18-month diploma program.

In lectures, Hashmi advocates women’s right to go to school and hold jobs.

She has raised the ire of traditionalists by ridiculing certain ritualistic beliefs, such as barring women from entering mosques when they’re menstruating or not allowing them to pray while wearing nail polish.

But generally, Al-Huda’s curriculum is in line with the orthodox Sunni Muslim establishment that has held sway in Pakistan since the 1980s. Shiite Islam, Sufism and other strains of the faith are seen as sacrilegious. Some students said divorce was discouraged.

About a year after she began attending classes, Husain decided to don the Islamic headscarf, or hijab. She hangs out with her friends less often in public places now, preferring to invite them to her house for barbecues. Recently, she was engaged to a young man of her family’s choosing.

But she hasn’t shunned her other male friends or broken off her old friendships. She listens to Islamic music, but she remains a huge fan of pop artists like Taylor Swift and Imagine Dragons.

“Music continues to be my weakest point,” Husain said laughing. “I would still call myself a struggling practicing Muslim.”