“Everybody needs a weapon,” said Mahmoud, a 23-year-old Egyptian arms dealer, as he displayed his inventory of pistols, machetes, and switchblades on the living room floor of his family’s apartment in the crime-ridden Cairo neighborhood of Ain Shams.

With Egyptian government statistics indicating a 300 percent increase in homicides and a 12-fold increase in armed robberies since the 2011 revolution, Mahmoud and other black-market entrepreneurs are capitalizing on a growing obsession with self-defense and civilian vigilantism among Egyptians who have lost patience with their government’s inability to restore security. Frustration with lawlessness is among the numerous grievances that will drive antigovernment protesters to the streets on June 30, the one-year anniversary of President Mohamed Morsi’s inauguration.

Mahmoud is one of many post-revolutionary lawbreakers who were victims of crime before they became perpetrators. When I asked him how he made the decision to start selling black-market weapons, he replied sarcastically, “What decision? I had no choice.” Over lukewarm Pepsi served by his mother, Mahmoud explained that he used to earn a living as a taxi driver. But shortly after the revolution, his car was hijacked at gunpoint by a local gang. Like many of the amateur black marketeers responsible for Egypt’s current crime wave, Mahmoud is a far cry from the hardened criminal I had been expecting; he is just a young man hoping to earn enough money to move out of his parents’ house, marry his fiancée, and replace his stolen taxi.

Mahmoud’s neighborhood is home to one of Cairo’s most active black markets in unlicensed weapons, where vendors hawk a variety of small arms -- stolen police pistols, locally made shotguns, knives, switchblades and Tasers -- at below-market prices. Although Egyptian law prohibits the sale of unlicensed weapons, these informal markets have thrived since the early days of the revolution. They operate openly and often in plain view of the police, who until recently showed little interest in regulating the illicit trade, despite soaring crime rates. Even in downtown Cairo, unlicensed weapons dealers have been known to set up shop just steps away from prominent symbols of judicial authority, the Lawyers’ Syndicate building (Egypt’s version of the Bar Association) and the headquarters of the Supreme Judicial Council.

In the days leading up to the June 30 protests, police have attempted to crack down on the illegal weapons trade. But dealers like Mahmoud are adept at evading the authorities. When police approach, they simply move their wares elsewhere, selling weapons from the safety of private homes or parked vehicles.

Black-market weapons range in price from cheap to high-end: a switchblade goes for about L.E. 75 ($10.75), a Taser costs around L.E. 350 ($50), and for L.E. 700 ($100), you can purchase a locally manufactured birdshot gun. Stolen police pistols, at the upper end of the market, sell for upwards of L.E. 2000 ($285). Small knives have become a popular choice for women, who have been plagued by an increase in sexual assault and harassment since the revolution.

Like good entrepreneurs, weapons dealers have been quick to exploit fears of violent crime. Just down the street from the crowded Naguib Metro station, in broad daylight, one cardboard sign urged, “Protect yourself for L.E. 10.” That $1.40 would buy you a dull but nonetheless menacing blade that looks guaranteed to inflict at least tetanus, if not more serious harm.

Many of the guns for sale come from the thousands of firearms that were ransacked from police departments during the revolution. Others are smuggled across Egypt’s borders with Libya and Sudan. The cheapest firearms are the birdshot guns, known as “fards,” which are handmade by underemployed craftsmen who cobble together the frighteningly inaccurate weapons from machine parts and scrap metal.

ANYTHING GOES

The proliferation of small arms in Cairo and across Egypt is just one symptom of the security vacuum that persists two years after the uprising that shattered Hosni Mubarak’s seemingly unbreakable police state. Distrustful of a police force known for being simultaneously abusive and incompetent, and wary of an increasingly politicized judicial system that rarely delivers justice, many Egyptians are administering law and order on their own terms.

In one particularly extreme case in March, two young men accused of stealing a rickshaw in a Nile Delta town were stripped naked, hung upside down from the roof of a bus station, and beaten to death by a mob of 3,000 people. Not all of the vigilantism is violent, however. Take Namaa, a civil society organization that works on sustainable development. The group is funding a crowd-sourcing initiative that solicits reports about neighborhood hazards -- damaged electrical wires, for example -- and dispatches volunteers to respond to problems that might otherwise be ignored by local authorities.

Meanwhile, facing intermittent strikes by judicial workers and police officers, Egypt’s overextended government is all too willing to outsource some of its law enforcement functions to nonstate actors and informal institutions. In the notoriously lawless Sinai Peninsula, official state courts have long preferred to delegate the adjudication of tribal disputes to customary courts. Since the revolution, local authorities there have tolerated the expansion of informal Sharia committees that administer Islamic law, creating what is beginning to resemble a state within a state. Informal justice is not limited to Egypt’s most remote regions, and unofficial customary courts in the greater Cairo area have seen demand for their services, ranging from dispute resolution to marriage licenses, increase notably since 2011.

Instead of working to reform the country’s dysfunctional institutions, some political leaders have embraced the devolution of core security functions to community-based policing initiatives or private contractors. Earlier this year, the Building and Development Party, the political wing of the formerly militant Islamist group al-Gamaa al-Islamiya, proposed draft legislation that would legalize unarmed “popular committees” to supplement the uniformed police force. In another instance of state-sponsored community policing, the Ministry of Supply recently announced the formation of unarmed, civilian-staffed popular committees to curb the smuggling of flour.

The outsourcing of traditional law enforcement functions to civilian and nonstate actors is a common pathology of weak states and transitioning democracies, in which security and judicial institutions are viewed as either illegitimate or ineffective. And indeed, Egyptians complain that the police never fully redeployed after they withdrew from the streets during the revolution. Those few who are present in the streets are doing nothing to combat crime.

Ahmed al-Shenawi, an Egyptian criminologist, told me about a neighbor in Alexandria who owns an empty lot and recently discovered that a stranger was unlawfully constructing an apartment building on his property. When the owner asked the local police to intervene on his behalf, he was told that there was nothing the authorities could do. The police did advise him, however, to hire some baltagiyya (Egyptian slang for “thugs”) to forcibly expel the interloper. Another common complaint, by victims of car theft, is that police refuse to assist them and instead recommend that they seek out the thieves and offer to buy back their stolen vehicles.

In yet another account of the state’s indifference to disorder, Shahinaz Nabeeh, a British-Egyptian journalist, once called the police after she saw a group of thugs beating a man in the Cairo neighborhood of Agouza. When she asked if the police could please be sent quickly, the dispatcher who answered the phone replied nonchalantly, “Inshallah” (God willing), and promptly hung up on her. The police never arrived, and the fight continued for two hours until the victim finally died.

In these cases, the refusal of police to do their job has more to do with apathy and incompetence than it does with corruption. But other reports suggest that a much more malignant phenomenon is at work: direct police complicity in organized crime. Criminal gangs are among the biggest beneficiaries of post-revolutionary lawlessness. They function as a substitute for state security personnel in the most dangerous slums of Cairo, allegedly with the tacit permission and even encouragement of police. According to Haitham Tabei, an Egyptian journalist who reports on urban crime, the police have willingly abdicated control over entire neighborhoods of the city to criminal gangs. These predatory groups operate illicit fiefdoms of racketeering, trafficking, and prostitution with total impunity, hiring thugs (and sometimes even children) to staff their private militias.

In Mahmoud’s neighborhood, gangs have been known to extort payments from shopkeepers in exchange for protection from break-ins. Some of them base their operations out of nearby Pharaonic tombs that were unearthed in the middle of a densely populated neighborhood over a decade ago and have been neglected by Egypt’s dysfunctional Antiquities Ministry ever since. Among the deteriorating ruins, local gangs are illegally constructing slum dwellings and extracting rent from hapless tenants who would otherwise be homeless.

Outside of Cairo, the problem is even more severe. Gangs control entire sections of major highways in Upper Egypt and Sinai, where they terrorize truck drivers with semiautomatic weapons and use the threat of carjacking to extort royalties from companies that rely on ground transport to ship their goods. As one truck driver told al-Masry al-Youm, a daily newspaper, “No road is safe after the revolution.”

"THE POLICE HAVE BEEN DEFANGED"

Although the primary function of the Mubarak regime’s security apparatus was to protect the state from its political opponents, one of its few positive side effects was an overall chilling effect on crime. Before the revolution, Cairo had one of the lowest homicide rates in the world, with significantly fewer murders per capita than Oslo, Helsinki, Toronto, Brussels, and New York, according to 2009 UN statistics.

Crime waves are to be expected in post-authoritarian transitions, and the tradeoff between democratic reform and insecurity has been widely studied in the context of the Soviet Union’s demise. So it is perhaps unsurprising that violent crime rates have soared since the collapse of the Mubarak regime. In particular, Egyptian criminologists attribute the uptick both to the presence of a significant number of escaped criminals who broke out of jails during the revolution and to first-time offenders who have resorted to crime for lack of legitimate job prospects. (Unemployment in Egypt now stands at a record 13.2 percent.)

During the 18-day uprising in 2011, more than 23,000 prisoners escaped, and some 5,000 escapees remain at large. But when I contacted Cairo police stations to ask whether the government has a strategy for recapturing the wanted fugitives -- or even has a list of their names -- I was repeatedly told that no such information exists. Ahmad Bastamy, a criminologist, explained that much of the paperwork documenting the names and charges against the at-large escapees was destroyed during the revolution, making their recapture all but impossible.

Crime has never been more of a problem, yet the government’s capacity to enforce law and order is at an all-time low. Egypt’s government has made a number of symbolic -- and almost entirely superficial -- gestures at security sector reform. A dizzying succession of cabinet reshuffles over the last two years has ushered in five new interior ministers. Mubarak’s hated domestic security agency, the State Security Investigations Service (SSIS), was rebranded with a new name, the National Security Agency, in an effort to signal its supposed commitment to protecting the people from the state, rather than the other way around. But despite the new signage and a handful of personnel changes, the core of Mubarak’s security apparatus has been largely preserved.

Meaningful security sector reform, a central demand of the revolution and one of Morsi’s forgotten campaign promises, has all but fallen off the political agenda. Egypt’s partially dissolved parliament and recently reshuffled government are preoccupied instead with mass protests, the deteriorating economic situation, and a legal battle over the design of the electoral system that has postponed elections indefinitely. A former police official, Mohamed Mahfouz, is leading a campaign to reform the national police force and rehabilitate its public image. But when I asked him how much progress has been made on the issue, he replied bluntly, “Absolutely none.”

In March, a senior official in the Building and Development Party estimated that 80 percent of the state security employees formerly employed by the Mubarak regime are still working for the supposedly reconstituted National Security Agency. Of those few officers who were prosecuted for crimes and rights violations during the revolution, the vast majority have been acquitted and reinstated. This has only reinforced an institutional culture of impunity that may prove to be Mubarak’s most intractable legacy.

Meanwhile, human rights activists are concerned that an expanding private security industry -- one of the few sectors creating jobs in Egypt today -- operates with alarmingly little oversight or legal accountability. Private contractors are increasingly being used to prop up the dysfunctional state security apparatus. The Brotherhood was forced to hire private security companies to protect its headquarters on June 30, after the Interior Ministry announced that the police would only be responsible for “state institutions.” The growth of a largely unregulated industry of private security guards, some of whom are licensed to carry weapons, presents another obstacle to comprehensive security sector reform.

Ironically, the non-Islamist opposition, which campaigned so vocally for state security reform during the revolution, is now itself preventing institutional change. Liberal parties that were calling for a purge of state institutions a year ago are now deeply suspicious of any new appointments or legislative reforms initiated by the Muslim Brotherhood-led government, which they fear is maneuvering to repopulate the state security apparatus with Islamists. Accusations of “Brotherhoodization” have put Morsi’s government on the defensive, and any attempts at reform will likely be resisted by an opposition whose primary agenda seems to consist of obstructing that of the Brotherhood.

Mahfouz fears that the entrenched culture of state security institutions is deeply resistant to change. “For decades,” he told me, “the police were taught that the people were their enemy and the state was their friend. Now, they need to be retrained to see the people as their friend.” But a new report documenting 359 cases of torture by security personnel since Morsi’s inauguration is a reminder that old habits are hard to break.

Despite the persistence of police brutality since the revolution, Egyptians are more likely to describe law enforcement officers as incompetent than dangerous. As one American diplomat who wished to remain anonymous put it, “The police have been defanged.” Convincing the police to protect people who hate them -- and no longer fear them -- is no easy task.

The police themselves complain that they are increasingly the victims of preemptive attacks by criminals and unruly protesters. In recent months, reports of stolen police vehicles and deadly attacks on officers -- sometimes in broad daylight -- have become commonplace. The government has responded by adopting new legislation that imposes harsher penalties for assaulting security personnel -- an admission of the growing vulnerability and ineptitude of a police force that once inspired terror.

Nabeel Zakaria, a retired army general, told me that Egyptians have given up on the police. “Everyone is responsible for his own protection now,” said Zakaria, who lives with his family in an affluent suburb north of Cairo. He says the two-hour-long commute into the city and back is well worth the peace of mind that comes with living in a gated community insulated from urban crime.

Zakaria’s assessment of the police is consistent with recent polling data, which found a stark disparity between levels of public support for the military and police. Whereas the military is by far the most popular institution in Egypt today (73 percent believe it has a positive influence on the country), only 35 percent of Egyptians expressed positive views about the police, and 63 percent believe that the police are doing more harm than good

BROKEN LAW

The courts have not fared much better. The Islamist-controlled executive and legislative branches have been engaged in a protracted power struggle with the judicial system, seeing it as an obstacle to their agenda. In recent months, Morsi and Islamist lawmakers have repeatedly called into question the neutrality of Mubarak-appointed judges and accused them of protecting the interests of the former regime. They are still reeling from decisions that the courts made last June, when judges dissolved the lower house of parliament and issued controversially lenient sentences in the trials of the former president and other regime officials. The entanglement of the judiciary in politics through repeated confrontations with the executive and legislative branches has eroded the institution’s legitimacy in the eyes of the public. As Shenawi described the situation, “If the president doesn’t even respect the courts, how can we expect the people to respect them?”

The conflict between the judiciary and the legislature escalated again in May, when Egypt’s Supreme Constitutional Court issued a provocative ruling invalidating the new electoral law and postponing parliamentary elections indefinitely. Meanwhile, Egypt’s judges have threatened to take to the streets over a draft law regulating judicial authority that they say would undermine the independence of the courts. These maneuvers have led the public to conclude that Egypt’s purportedly neutral judiciary is now functioning as a political interest group that may be tempted to prioritize its own self-serving agenda over the rule of law.

Without a serious effort to rebuild confidence in Egypt’s security apparatus and judicial institutions, there are few incentives to abide by laws that are neither enforced nor respected. Egyptians once lived in fear of the state. Now they fear its absence. Against the backdrop of antigovernment protests, the black-market weapons boom in a context of unchecked lawlessness is an alarming reminder that Egypt’s government, which so recently oversaw a vast police state, has now lost its monopoly on violence.

During a widely ridiculed speech on June 26 that was intended to placate the opposition, Morsi tried to deflect blame for the unrest onto former regime loyalists known as feloul, whom he accused of hiring gangs to instigate trouble. These paranoid allegations of organized thuggery, whether true or not, were the words of a leader who knows he is not fully in control. The diffusion of lethal weapons among civilians who no longer fear or respect their government has created a highly combustible atmosphere in which violence is viewed as a legitimate and even necessary response to insecurity.

On both ends of an intensely polarized political spectrum, Morsi’s supporters and his opponents insist that they are committed to diffusing violence. But the two camps are behaving in ways that make armed confrontation inevitable. Islamists organized a rally under the slogan “No to Violence” on June 21, yet a Brotherhood-affiliated televangelist, Safwat Hegazy, took to the stage to proclaim, “If anyone so much as sprays Morsi with water, we will spray him with blood.” Two days later, anti-Morsi protesters violently attacked the Brotherhood’s headquarters in the Nile Delta town of Damanhour, killing one person and injuring sixty more. Neither the opposition nor the Brotherhood is doing much to reduce the probability of a bloodbath on June 30, other than to engage in a mutually discrediting display of blame-shifting.

Meanwhile, the looming specter of violence has inspired nostalgia for the days of military rule. Earlier this month, protesters gathered outside of the Ministry of Defense to demand that Morsi transfer power to the head of the armed forces. But the restoration of martial law would be a superficial and ultimately unsustainable solution to a security vacuum that requires much deeper institutional reforms. Egypt’s precarious democratic experiment hinges on whether the country can build an accountable state that can be trusted to maintain a monopoly on violence and wield it lawfully and humanely. Until then, Egyptians will continue to take security into their own hands.