On October 6, Egypt marked the 40th year of its surprise attack on Israel and the commencement of the Yom Kippur War, which ended in a Pyrrhic victory for the Egyptian military in Sinai.
"Armed Forces Day", as it is known in Egypt, is an occasion for political grandstanding, although not always on the establishment's terms. In 1981, for instance, it was the backdrop for the assassination of then-president Anwar Sadat.
This year's ceremony was a far cry from the previous year, when then-president Mohamed Morsi used the occasion to deliver an hour-and-a-half-long speech to a crowd of about 60 000 in Cairo Stadium. During this month's commemoration, supporters of the deposed Morsi, who was ousted in a popular military coup on July 3, clashed with security forces in Cairo's neighbourhoods and in other parts of the country, leaving more than 50 people dead.
Meanwhile, Tahrir Square – the epicentre of massive protests against both the regime of Hosni Mubarak in 2011 and that of Mohamed Morsi earlier this year – was filled with cheering, flag-waving supporters of the ruling military junta led by General Abdel Fattah el-Sisi.
Security at the square was predictably tight and, while covering events there in the early evening, I was arrested by plainclothes Egyptian police officers. Several others who had stirred the suspicions of twitchy policemen were apprehended alongside me.
We were then taken to the Kasr El Nil police station, where last month a French citizen, arrested for breaking a night-time curfew that has remained in place since the massacre of Morsi supporters in mid-August, was beaten to death while in custody. I was released unharmed later that night, however.
I was not the only foreign journalist detained on October 6. Two freelance journalists, New Zealander Campbell MacDiarmid and Adam Ramsey of Britain, were arrested while covering clashes in Cairo's Dokki neighbourhood.
Ramsey said: "I was thrown into the back of a police van with about 10 others and driven to Dokki station. When we got there, a line of CSF [Central Security Forces] guys were kicking and hitting us as we passed by." After being forced to kneel for several hours in overcrowded cells, Ramsey was eventually released, though his confiscated possessions were not returned.
Other journalists have fared far worse since the crackdown on the Muslim Brotherhood and the ensuing state of emergency began, with August proving to be a particularly dangerous month for those covering the recent turmoil. During clashes on August 14, three journalists were killed and several others seriously injured.
Harassment and arbitrary arrests of journalists have become routine, and several media outlets, including Al Jazeera, have been forced to close. Meanwhile, Al Jazeera correspondents Mohamed Badr and Abdullah al-Shami have been in prison since July and August respectively.
The imprisonment of Canadians John Greyson and Tarek Loubani has been spotlighted in the international media. The two men were passing through Cairo on their way to Gaza, where Greyson, a filmmaker, planned to make a documentary on Loubani's medical work.
On August 16, the pair was arrested after returning from street clashes near Ramses Square, where Loubani was treating casualties while Greyson filmed. This marked the beginning of a seven-week ordeal during which time the two Canadians were intimidated, beaten, confined to a 3.5m by 5.5m cell with several others, and accused of being foreign agents. They were eventually released from Tora prison without charge.
According to Ramsey, the situation for journalists has deteriorated dramatically since August. "When they [the police] used to grab me, I would tell them I'm British, and they would stop. This last time, it didn't happen … I think it's got much, much worse."
Police officials and authorities at Dokki and Kasr el Nil stations were unavailable for comment.
But while journalists have increasingly found themselves in the cross-hairs of a repressive security apparatus, the fate of ordinary Egyptian detainees who do not have the institutional backing of a foreign embassy or major media organisation is generally far more severe.
In the five or so hours I spent in police custody, I witnessed a steady stream of detainees flow into the station, a cross-section of those targeted by security forces that day. In short, anyone expressing sentiments critical of the military, and anyone who looked like a potential supporter of Morsi's religiously conservative Muslim Brotherhood was considered fair game.
Some of those brought in had been arrested at clashes. Many others, however, were innocents who happened to be in the wrong place at the wrong time. It is not uncommon these days to hear of men being hauled off the streets and whisked away in crammed police vans simply for sporting long beards.
One human-rights activist, speaking on condition of anonymity, recounted how, in the early hours of the morning, he was stopped and searched by a police officer who found a political novel and a list of signatories for a political petition in his possession. "The officer thought I was from the Brotherhood, probably because of my beard," the activist said. He spent three nights in prison.
Another activist, who was once detained under Mubarak's rule, said that "the current regime has so much support, it is easier for the police to commit human-rights violations and arrests under emergency law, especially now that there is the rhetoric of the war on terror and fear politics taking hold".
When Morsi came to power in a narrow electoral victory in mid-2012 many pinned hopes on the new government ushering in sorely needed reforms in policing and state security. But their hopes were dashed when it became clear that the leaders in the new Brotherhood-dominated government were less interested in overhauling key security institutions than in implementing a narrow Islamist agenda.
Many of the new Brotherhood leaders, as members of an organisation that was banned for much of its existence, came to power having had direct experience of imprisonment and torture. But while attempting to centralise power, they continued to employ the sort of heavy-handed tactics that previous regimes had used against them.
Under Morsi's rule, Brotherhood thugs acted as government enforcers, emergency laws lent greater freedom to security services to violate human rights with impunity, and religious intolerance and the persecution of minorities intensified. In the aftermath of Mubarak's fall, the media landscape grew tremendously, but the Morsi government nevertheless pushed back against the gains of the media. Journalists were routinely attacked and denounced for "inciting violence", "insulting the president" or "insulting religion".
Such draconian practices contributed to Morsi's downfall by alienating large sections of the Egyptian public that had initially been willing to give him a chance. The widespread disaffection with Islamist rule has now translated into renewed and uncritical support for the military, and state institutions are united in a way that they never were under Morsi.
Egypt's interior ministry, the notoriously murky government body charged with law enforcement in the country, is still staffed by many Mubarak-era apparatchiks who were left reeling after the ousting of the old regime whose dirty work they carried out. The ministry, accused in the past of overseeing the systematic torture of government opponents, is now emboldened and eager to exact revenge on the Brotherhood and other enemies. Officials at the ministry ignored requests to respond to allegations of human-rights abuses.
As nongovernmental organisations such as Human Rights Watch and the Egyptian Organisation for Human Rights have warned, a deeply entrenched security doctrine in which torture is standard practice, coupled with legal ambiguities and loopholes, still allow for widespread human-rights violations and impunity for torturers, and there has been little political will at the top to change that.
Far from improving in any way, the human-rights situation in Egypt has come full circle since the toppling of Mubarak. Police excesses fuelled the uprising against that regime, but more than two and a half years later, the repression shows no sign of abating.
Micah Reddy is a South African freelance journalist based in Cairo