The perils of being a reporter in Egypt under Sisi
The holding of Egypt's parliamentary elections marks the final stage in a promised transition back to democracy, more than two years after the military overthrew President Mohammed Morsi. But rights groups say the country is now more repressive than at any time before. The government says a slew of tough restrictions on civil liberties are a security measure, but many curb freedom of expression, including that of the media.
Here the BBC's Wael Hussein describes how operating as a journalist in Egypt has become an increasingly risky job.
New legislation and a hardening attitude towards journalists make our daily work more difficult and dangerous.
There is a constant risk of threats, harassment or arrest. The freeing of three Al Jazeera journalists this year came as a relief, but there are believed to be at least 18 media workers still behind bars.
Last month, President Abdul Fatah al-Sisi told CNN: "We have unprecedented freedom of expression in Egypt. No-one in Egypt can bar anyone working in media or journalism or on TV from expressing their views."
The reality, though, is quite different.
An anti-terrorism law passed in August is intended to fight a growing jihadist insurgency - but it it is also another tool to crack down on dissent and control news reporting.
The law specifies hefty fines of up to $64,000 (£41,000) for "promoting false news" or contradicting official statements on militant violence and counter-terrorism operations.
This is already having a visible impact.
Journalists can no longer rely on their own eyes or sources when writing a story about any jihadist attack. Instead, they must await the government line - if one emerges.
The changes make it particularly hard to cover events in the troubled North Sinai region - now a closed military zone where Egyptian troops are fighting a local group aligned with the so-called Islamic State.
Other restrictions come from gag orders. These are now commonplace in high-profile cases.
In September, the foreign minister promised a "transparent investigation" after Egyptian forces accidentally attacked a group of Mexican tourists and their local guides in the Western Desert, killing 12 people.
But hours later, the public prosecutor issued a gag order preventing all media - domestic and international - from further discussing what happened.
In truth, journalism in Egypt has never been easy.
During the years of President Hosni Mubarak, reporters knew the red lines and mainly stayed within them.
However, the rules were rewritten during the 2011 uprising.
While the state media began accusing non-Egyptian journalists of being foreign "agents", local reporters also had to adjust to a changed reality.
In the heady days after Mubarak was ousted, it was hard to know where as journalists we stood.
Once, after a colleague and I questioned police officers about needed reforms we were marched to their headquarters, expecting to be detained.
Instead, we were invited to drink coffee with a police commander who gladly answered all our queries.
Yet the situation soon became troubled again, as the media was caught up in a power struggle between the Egyptian military, judiciary and secular and Islamist political forces.
After Mohammed Morsi of the Muslim Brotherhood won the 2012 presidential election, the country's polarisation was increasingly reflected through its media.
The next year, as the armed forces removed the president from office following mass protests, many pro-Morsi outlets were shut down.
Soon afterwards, the office of the Qatar-owned Al Jazeera was also closed, with Doha accused of backing the Brotherhood - later designated a terrorist group.
Some journalists were among the hundreds killed and wounded when security forces broke up protests for the deposed president.
Others, such as the photographer, Mahmoud Abou Zeid (also known as Shawkan), were arrested. He remains in prison, with his health deteriorating, and his case has only recently been referred to trial.
Eyes and ears
As Egypt confronts a jihadist insurgency, there is extreme sensitivity among the authorities to any criticism. This means there is heightened mistrust and hostility towards the foreign press.
When journalists ask officials for comments, they mostly refuse. Those who speak tend to do so anonymously. There are ongoing problems around slow responses and the right of reply, which have resulted in some public spats.
On Twitter, the foreign ministry spokesman has described the Washington Post correspondent as "lacking experience" and being "ignorant of politics."
On another occasion, he accused a New York Times correspondent of "one-sided" reporting on the imprisonment of an American-Egyptian. He said it was "unacceptable and unreasonable" to "ask for info hours before publication, on night before weekend, and expect timely response".
Foreign journalists have also been provided with a guide on what terminology to use and not use when describing "terrorist groups".
And in July, Fact Check Egypt was set up - a new office of the State Information Service with a mission to check, and chide, foreign media.
It sends out emails demanding the publication of corrections for reports that are seen as contradicting the government narrative.
But perhaps an even more effective tool has been the voluntary work of so-called "honourable citizens", ordinary Egyptians, who keep an eye on the streets on behalf of the authorities.
The minute a foreign journalist is spotted, some locals demand passports, press cards and even a filming permit. Some have roughed up reporters.
During the 2014 presidential elections, police briefly detained our BBC team. They were alerted after neighbours spotted us interviewing the wife of a man killed a year earlier.
The concern raised is always that the nation's image is being tarnished. However, as groups advocating media freedom consistently point out, it is often Egypt's treatment of journalists that itself reflects badly on the country.