After the Paris terror attacks back in January, mystery swirled around one of the gunmen's partners, Hayat Boumedienne, a young French woman who's believed to have fled to Syria.

Since then, three British schoolgirls and a Colorado woman are among those who apparently traveled to Iraq or Syria to join the self-declared Islamic State, or ISIS.

All these cases have prompted authorities to examine how ISIS recruits women.

Analysts estimate some 20 percent of ISIS recruits are women, and their roles are changing: They're not just jihadi brides, but active recruiters and sometimes even attackers.

In Ceuta, a tiny Spanish territory in North Africa, several women have been arrested for allegedly recruiting other women to join ISIS. Spanish officials say they've uncovered Europe's first all-female jihadi ring. At its center, they say, are two friends from high school: Loubna Muhamed, 21, and Rahma Yarmak, 18.

This is their story.

"Loubna comes from a middle class family — I know them well," says Laarbi al-Lal Maateis, president of the Union of Islamic Communities in Ceuta. "Her father owns a big taxi company. Her grandparents are retired shopkeepers. The girl wore a headscarf, but dressed in a modern way. She liked all the popular brands."

Maateis, a Muslim scholar who oversees Ceuta's mosques, has counseled both girls' families. He says Loubna and Rahma were normal teenagers, constantly on Facebook, texting and chatting via WhatsApp on their smartphones.

The girls grew up together in Ceuta, which is separated from the rest of Europe by the Mediterranean Sea, and separated from neighboring Morocco by a huge fence.

Ceuta is part of Spain and thus the European Union. The residents have Spanish passports. But they live in limbo between two continents. The territory has no airport, only a helipad, and a ferry is required to go back and forth to the Spainish mainland.

Half of Ceuta's residents are of European descent, but the faster-growing half are Arabic-speaking Muslims, whose ancestors came from Morocco. The territory has a jobless rate of more than 30 percent, one of the worst unemployment problems in Europe.

Experts say Ceuta's mix of religion, poverty and isolation make it fertile ground for a new type of jihadi recruitment: for women, by women.

Loubna was the first of the two friends to go.

"She'd just started a new job teaching nursery school [last November.] She worked seven days and then went missing," Maateis recalls. "She phoned her parents from Turkey, on her way to Syria [to join ISIS]. I often speak to her father, her grandfather and uncle. They're all traumatized."

NPR was unable to reach Loubna on Skype or social media.

From ISIS territory, Loubna contacted her teenage friend Rahma, on WhatsApp, almost daily. Rahma was engaged to be married to a young man from Ceuta. Maateis performed a religious ceremony for the couple in his office in December, and they were planning a wedding party within weeks.

Then Rahma disappeared.

But Spanish authorities had been monitoring her WhatsApp messages to Loubna, and knew her plans. En route to Syria, Rahma was arrested on the Turkish border in early January.

What's unique about these girls is that according to Spanish officials, they were not aspiring ISIS brides — but rather, master recruiters for the militant group.

Spain says intercepted communications show that Loubna and Rahma were members — perhaps even the leaders — of an all-female jihadi ring — recruiting fellow Ceuta women to become militants.

They were the perfect tools for ISIS. They're obsessed with social media and have easy access to fellow women, says Carola Garcia-Calvo, a terrorism expert at Madrid's Elcano think tank, who has studied Loubna and Rahma's case.

"They used their blogs and WhatsApp and stuff. They were very persistent," Garcia-Calvo says. "So this is why the role of women to attract more women [to ISIS] is huge — and they use it, they use it."

The all-female jihadi network that Loubna and Rahma were allegedly part of was overseen by men in Morocco, but staffed exclusively by women, García-Calvo says. They recruited fellow women via social media, but also in person, in their densely-populated hometown of Ceuta, she says.

"In spite of the Internet, face-to-face radicalization still occurs. In my opinion, the radicalization process in Spain is a mix of the Internet — the virtual world — and the real world. Contact with people still matters — especially friends, colleagues and family," García-Calvo says. "We can see how social environment is very important."

In Ceuta, like many conservative Muslim enclaves, women are often less likely to work outside the home, more likely to socialize online or in all-female groups, and in private rather than in public. This makes their networks more difficult for intelligence agencies to penetrate.

A senior Spanish defense official said police have infiltrated mosques across Spain with undercover male agents — but have had trouble recruiting any female ones.

"The infrastructure for countering violent extremism tends to be just very male," says Jayne Huckerby, a Duke University law professor who advises governments on gender and countering violent extremism.

She says Loubna and Rahma are a classic example of how stereotypes of women's passivity or domesticity often lead authorities to underestimate their potential threat as ISIS operatives.

"Women, and in particular young women, have taken a very prominent role as recruiters of other young women in their peer networks. Women have also been in all-female brigades, charged with enforcing morality codes in ISIS-controlled territories," Huckerby says. "And women have also been key actors in terms of going on home raids and operating checkpoints."

Huckerby says governments need to better understand how some Muslim women may feel alienated in European society, if they want to counter the influence of ISIS on them.

In the poor Ceuta neighborhood of El Principe, where Rahma grew up, teenage boys yell 'Al-Qaida!' at foreign visitors. They know the area's reputation. There's ISIS graffiti on one wall.

At least 15 families in Ceuta have reported their loved ones missing, suspected of traveling to join ISIS in Syria or Iraq. Rahma is among more than a dozen local residents who've been arrested. Those numbers are startlingly high for a city of about 85,000.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.