In late November 2013, Egyptian police rounded up 14 female activists in downtown Cairo, including three prominent women who had helped lead the first protests against former President Hosni Mubarak’s regime in 2011. Three years later, the women were still at it, now protesting military trials against civilians and a draconian new law banning public demonstrations without a permit. Following the arrests, the women allege, they were detained for several hours by the police, beaten and sexually abused, and then dumped in the desert outside the city.

The ordeal was the latest episode in an appalling season of violence against women in Egypt. Although mob attacks have been taking place since at least 2005, many Egyptian women say that sexual harassment and assault have worsened in both frequency and severity following the 2011 revolution. Women attending large protests have been gang raped and attacked with sharp instruments, often in what appear to be coordinated assaults on women in large crowds. Cairo-based nongovernmental organizations such as the New Woman Foundation and El Nadeem Center for Rehabilitation of Victims of Violence and Torture provide direct support to the victims of such attacks. But many women are either too afraid or unwilling to come forward to speak about their experiences. A recent poll by the Thomson Reuters Foundation named Egypt the worst place for women to live in the Arab world.

Rising harassment and violence against women in Egypt reflect both long-term trends in government policy and more recent shifts during the country's seesawing post-Mubarak transition. Since the 1970s and 1980s, the Egyptian state has increasingly treated women as second-class citizens. A 1980 amendment to Egypt’s 1971 constitution, passed under President Anwar Sadat, established “principles of Islamic law” as “the principal source of legislation.” The constitution privileged a woman’s “duties toward her family” and her role within Islamic jurisprudence. Women also faced harsher legal penalties for committing adultery. The constitution expressed broader social shifts in Egypt toward religious conservatism, which included attempts by the state to control women and sexual mores.

Prior to the 1970s, only the most conservative women wore headscarves, but cases of sexual harassment were rare. Men caught harassing women were chased through the streets and often had their heads shaved as a mark of shame. Today, women face a significant social pressure to cover up, and are often blamed for sexual harassment if they don’t. Still, according to a recent UN report, more than 99 percent of women in Egypt have been sexually harassed.

The 2011 revolution may have toppled Mubarak, but it did not liberate Egyptian women. In the transition under both military-backed governments and one led by the Muslim Brotherhood, the state has only increased its efforts to control women’s sexuality. According to Hania Sholkamy, an anthropologist at the American University in Cairo, “There are issues to do with sexuality, men and women’s sexuality, that have just been left to a very strict moral regime” rather than to the individual.

The Supreme Council of the Armed Forces, which stumbled through the immediate post-Mubarak transition, exemplified that regime when it carried out so-called virginity tests on women arrested at protests. The military defended the violent and invasive examinations as a way of “protecting the girls from rape.” It even said that the tests were intended to shield officers from (what the military insisted would be unfounded) charges from women that they had been raped while in military custody. When the virginity tests caused widespread outrage, a senior general tried to justify them by saying that the detained women “were not like your daughter or mine. These were girls who had camped out in tents with male protesters.”

These sexist attitudes continued when the Muslim Brotherhood was in power. Its parliamentary wing, the Freedom and Justice Party (FJP), believed that dividing men and women would help quell sexual relations outside of marriage, and so it began to introduce gender segregation in trains and hotels, as has long been de rigueur at many Muslim Brotherhood demonstrations. (Segregation was hardly new in Egypt; the Cairo metro has long had a female-only car.) According to Sholkamy, the Brotherhood saw “anything that would lead to curtailing female sexuality… as a good thing.”

Under President Mohamed Morsi, the Shura Council, Egypt’s upper house of parliament, even pushed for the convictions of victims of sexual assault. Last summer, weeks before the military ouster of Morsi, the FJP’s Shura Council human rights representative, Reda el-Hefnawy, insisted to me that there are “so many reasons” why harassment remains the woman’s fault. He said that if women choose to stand among men at the protests and fail to cover themselves up, sexual harassment is not only inevitable -- it is their responsibility.

The effects of such policies and attitudes were obvious. “I hardly see any women in the streets,” Mona Eltahawy, an Egyptian-American journalist and commentator, told me last summer. “A woman can barely leave her house and be safe and maintain her bodily integrity. So she goes back home.” Last June in Cairo, I asked my twenty-something friend Ahmed what goes through the average Egyptian man’s head when he sees a woman in the street. “He’s probably hoping you’re a virgin,” Ahmed said, “so that he can fantasize about marrying you.” Such desires are borne of circumstance: marriage is the only socially acceptable path to sex in Egypt.

The divide between men and women has had dangerous consequences. According to Sholkamy, marriage is often used to “plaster over sexual dysfunction” and “a sexual imbalance” between men and women, when in fact this imbalance has led to tensions and violence in the first place. This has produced a toxic environment in the streets, where women dread having to use certain public transportation (Cairo’s teeming buses, unlike the metro, are not segregated) or even walk down a busy street. The situation has reached the point where 83 percent of the UN study’s respondents said that they felt neither secure nor safe on Egypt’s streets.

Egyptian women have also faced increasing pressure, from the state, religious authorities, and people in the streets, to dress and act more conservatively in public. Some women have been accosted or berated by other conservative women for failing to do so. In November 2013, two women wearing niqabs attacked and cut the hair of a Christian woman and then pushed her out of the train carriage, shouting “Infidel!”

These attitudes extend to the broader policing system, which is designed to work against the victims rather than the perpetrator. In order for a woman to report an incident of harassment, she is required by law to catch her attacker and bring him and two other witnesses to the police. In the unlikely event that she manages to do so, there is no guarantee that the policeman who deals with her case will actually follow through with a report.

Women regularly “have to fight with the police to actually make the report, in the street, and at the police station,” says Rebecca Chiao of HarassMap, an online and offline volunteer-based initiative in 17 governorates around Egypt with the mission, in its words, “to end the social acceptability of sexual harassment and assault in Egypt.” Its Web site allows users to report incidents -- from “catcalls” to “indecent exposure” and rape -- to a constantly updated map that is accessible on mobile phones. A large red dot over greater Cairo recently showed 944 reported incidents.

This kind of crowdsourced tool, as helpful as it is, does not fix official discrimination and negligence. Police often either refuse to believe women’s accounts of attacks, blame them for allowing them to happen, or, in some cases, even harass or rape women themselves. Like much of Egyptian society, policemen, according to Chiao, tend to believe that women carry the burden of responsibility when it comes to protecting themselves. And so the majority of sexual assaults go unreported, the perpetrators remain free, and sexual harassment just becomes more culturally acceptable.

Harassment does not differentiate between religious and secular women, between supposedly modest and not. According to a study by the Egyptian Center for Women’s Rights, 86 percent of the women surveyed said they had experienced harassment, and 72 percent of these were wearing either the hair-covering hijab or the face-covering niqab. In fact, Chiao told me that HarassMap research showed that veiled women are sometimes targeted because attackers believe that they are less likely to respond.

In this grim environment, one must look for any sign of good news. Egypt’s new constitution, which was approved by 95.2 percent of voters in a referendum in mid-January, suggests some incremental improvements for women’s rights. It explicitly states that women are equal to men and mentions the state’s duty to protect women from “all forms of violence,” something the 2012 constitution hastily passed under Morsi failed to do. However, the new constitution still states that the principles of sharia are the basis for Egyptian legislation, which contradicts its statement of equality between men and women, given the gender inequality embedded in Islamic law.

Frustration and violence are the result of sexual desire being kept underground by a controlling and patriarchal society that shows little regard for women’s rights and livelihoods. Until the root of the problem is addressed, women will continue to see their freedoms and rights curtailed. According to Sholkamy, women must be free to make up their own minds about sexuality and supposed modesty. But that is impossible in an environment in which both the state and the society at large are, in her words, “depriving women of the right to this agency.”