As Egypt cracks down on its Islamist dissidents, many of the country's lawyers are finding themselves on the wrong side of the law as well. Attorney Mohsen al-Bahnasy says so many fellow lawyers have been arrested or charged in recent months that he now spends much of his time defending them in court.
One of the lawyers he represents is accused of distributing leaflets supporting the Muslim Brotherhood, the Islamist group banned by the government of President Abdel Fattah al-Sisi. According to Bahnasy, his client, a lawyer, was in a police station with his own clients at the time of the alleged crime. Bahnasy says the lawyer, like others deemed sympathetic to the Brotherhood, has never distributed such leaflets and is the victim of trumped-up charges.
An official in the police station said that the accused lawyer had supported several Brotherhood protests. "It is not logical that we would accuse him of inciting protests" if he had not done so, the official said.
In all, more than 200 lawyers are behind bars in Egypt for defending the government's Islamist opponents, according to attorneys and human rights groups. They say the number of arrests is far higher than during the rule of President Hosni Mubarak, who imposed an emergency law allowing individuals to be imprisoned for any length of time. Even under Mubarak, lawyers rarely faced jail and were free to defend his fiercest opponents, attorneys say.
A senior Ministry of Justice official confirmed that a large number of lawyers are being held on charges connected to the Muslim Brotherhood. He said the number is "probably up to 10 times" the number held under Mubarak: "They are locked up in accordance with the law and accusations from the prosecution."
But attorneys and rights activists say Sisi and his government are arresting lawyers to intimidate them into avoiding political cases. Egypt's justice system is meant to be independent of politics, but activists say it is being directed by the government.
"The authorities are attacking the legal profession so that their opponents have no-one to defend them," said veteran lawyer Montasser al-Zayat, who heads a campaign for the release of detained lawyers. Zayat, himself a former jihadist, has been defending Islamists for decades - including those put on military show trials during an insurgency in the 1990s. A burly man with a white beard, he helped mediate a truce in 1997 that ended years of militant violence against the state. He says things now are worse than he has seen them. "I've never been so scared."
In June, lawyers launched a general strike after a one of them was assaulted by a police officer inside a police station in the town of Damietta. The lawyer was pressing the police to move his client's case along, and in the ensuing argument one of the police hit him with his shoe - a particularly insulting act in the Arab world. Sisi apologized "to every Egyptian citizen" for the incident and urged the police and other government bodies to be aware that "they are dealing with humans."
The government says it is not systematically cracking down on lawyers. Ayman Hilmy, a spokesman at Egypt's Interior Ministry, said, "There is no crisis or problem between the police and the lawyers. All sides work according to the law." He said the Interior Minister has repeatedly said the police respect the judiciary and lawyers and that police brutality will be punished through the courts.
Sisi, a former military chief who became president in 2013, has often said he has to take a tough line to counter the Islamist insurgency that has led to two years of bloody bombings and attacks.
The crackdown began soon after the military overthrew President Mohamed Mursi, a Muslim Brotherhood member who was elected in 2012. After Mursi fell, Egyptian security forces killed hundreds of Brotherhood sympathizers in Cairo protest camps. Thousands of others have been arrested. Human rights groups estimate 40,000 political prisoners are held in Egyptian jails.
Sisi argues that the Brotherhood, which renounced violence years ago, shares the same ideology as Islamic State, the militant group that has seized vast swathes of territory in Syria and Iraq. Islamic State has now spread into Libya and Egypt's Sinai desert, where separate groups are fighting an insurgency against Egyptian security forces.
Lawyer Sayid Abu Aysh believes he is one of those targeted as part of the government's campaign to repress Islamists. In August, Abu Aysh arrived at a Cairo courthouse alongside suspected criminals in a truck with small slits for windows. Under a slow-turning fan that struggled to cut the stifling heat, he sat handcuffed to an alleged criminal.
Interior Ministry officials say Abu Aysh is guilty of inciting violence and taking part in an arson attack alongside a man he had been defending. Prosecutors say the pair set fire to a Cairo telecommunications shop along with other Islamists. Abu Aysh says he is innocent and complains that he has not been formally charged since his detention in March. Judges keep renewing his 45-day detention and he is held in a cell with 35 others.
At the August hearing, twirling prayer beads through his fingers, Abu Aysh said he had been held for months without being formally charged. The judge extended his detention again.
"How can they treat lawyers like this?" he asked a reporter during a break in the hearing. "They turn my cell upside down. They want to demoralize us and they are succeeding. Many lawyers I know say they want to quit the profession. Personally, if I am released, I will only take on criminal cases. It is too risky to deal with political cases nowadays."
Abu Aysh's lawyer is Amr Dawood, who spent more than a year in prison himself after he was arrested in August of 2013 for his alleged membership in "a terrorist group" - a reference to the Brotherhood. His lawyer back then? Abu Aysh.
It's not just lawyers who say attorneys are being targeted. Human rights groups including Amnesty International say the same. "The Egyptian government tends to charge and arrest lawyers on trumped-up charges with the sole purpose of preventing them from working on critical cases," said Mohamed ElMessiry, Amnesty International's Egypt officer.
The International Commission of Jurists, which is composed of judges from around the world who promote human rights, has a list of over 200 Egyptian lawyers whom it says have been detained and prosecuted. The group has been able to verify only a few cases of arbitrary detention, but says the targeting and muzzling of lawyers - "the last line of defense for victims of serious human rights abuses" - is an extremely worrying development.
At least one lawyer has died after being detained and charged with connections to the Brotherhood. Karim Hamdy died in police custody in February two days after he was arrested at his home for allegedly taking part in anti-government protests organized by the Brotherhood. Two policemen are now standing trial on charges of torturing the lawyer until his death. Forensic reports showed he sustained fractures in the ribs, bruises and bleeding in the chest and head.
Other lawyers have been kept locked up. In 2013, Mohamed Abdel Karim, an attorney with an interest in human rights who had investigated alleged abuses against Mursi supporters, was arrested in Cairo. He has been in prison ever since. Last month, he appeared in a white prison outfit in a cramped cage in a court just outside of Cairo.
He tried to communicate with his lawyer and a reporter through the glass and metal bars but was stopped by a state security agent. Other men in the cage shouted, "Let us out," then fell silent after guards with clubs rushed into the pen.
At Abdel Karim's family apartment in Cairo, his brother-in-law Ibrahim Mohamed Ibrahim said his relatives had appealed several times to the prosecutor for his release but have been ignored.
Sources in the prosecutor's office said Abdel Karim is accused of inciting violence and attacking security forces during one of the Cairo protests in August of 2013 soon after Mursi was ousted. "If he has any proof of his innocence, let him present it to the prosecutor's office," said one of them.
Other lawyers have been attacked inside court. In July, a policeman shot lawyer Mohamed al-Gamal at a Cairo courthouse, according to sources at the prosecutor's office. The policeman has been charged with the shooting.
Sisi shows no sign of easing his crackdown on the Brotherhood and its supporters. In August he approved an anti-terrorism law that gives authorities sweeping powers and shields those applying it, such as the military and police.
Amnesty International's ElMessiry said incidents such as the court shooting show "that the security forces do not fear criminal liability" and operate with a sense of impunity. "The prosecutors' investigations in these incidents are half-hearted with the sole purpose of protecting the security forces from criticism."
Lawyers such as Mohamed Hassan are taking no chances. He has been on the run since police showed up at a relative's house in Cairo looking for him four months ago. Hassan, who has defended Islamists in several cases, said police accused him of using force during protests. He denies that.
"The authorities are after us and making accusations because they know we expose the flawed, unfair justice system," said Hassan. He said he had tried but failed to flee the country. "I can't turn myself in because the legal system is not based on any justice. I can't prove my innocence."
Mohsen al-Bahnasy, the lawyer who now spends his days defending fellow lawyers in court, also fears for his safety. "I never use my own car because I am afraid the police will plant something to frame me."
Zayat, the veteran campaigner, holds dinners for the families of jailed lawyers and fundraises for them. He sees no more room for compromise with the government.
"Today I am free," he said at an event in a decaying ballroom in Alexandria. "Tomorrow I may be in jail."
(Additional reporting by Ahmed Mohamed Hassan; Edited by Richard Woods, Simon Robinson and Sara Ledwith)