Image copyright AFP

A nervous calm prevails in Egypt, which has lived through an uprising and the ousting of a president. The country is in the process of voting for a new parliament - but while the current government seems to have brought greater security, has this come at the cost of freedom, asks Kevin Connolly.

The yellowish light of 1,000 40-watt bulbs hangs over the old railway station like a grimy tarpaulin.

Just beyond the glow of that dull, tobacco-tinged mantle the greasy grey air of the Cairo evening stirs sullenly in the breeze.

It is almost time to go. Train doors are slammed and tickets checked and sweet sludgy coffee dribbles from the steaming pipes of the trackside vendors.

Then, suddenly, in a moment the familiar rituals of parting and departure stop.

Two of the great contradictory impulses of Egyptian life are about to be played out in front of us. A Russian playwright couldn't have skewered the authoritarianism and the parallel tendency towards anarchy with greater precision.

There are, it seems, two reasons for the change of mood.

The first is that a patriotic fellow traveller has noticed that one of our party has taken a smartphone snapshot of the red neon indicator board that announces the time of the departure of our night train to Luxor.

Image copyright ALAMY

He has calculated - correctly as it turns out - that the way the photograph has been framed would mean that a uniformed police officer would appear on the edge of the image.

Stirred to action the policeman insists on seeing the photograph.

And there indeed he is - or at least there an unrecognisable half of him is from the back of his beret down to the heels of his shoes.

He is apologetic but unbudgeable. The photograph showing his tactical disposition as he chatted and smoked with passers-by might be of use to terrorists and must therefore be deleted.

While all this is being debated there is a sudden and vigorous hammering on the doors of our railway carriage. Not the doors which open safely on to the platform but the sealed ones on the side which look on to the tracks.

Find out more Listen to From Our Own Correspondent for insight and analysis from BBC journalists, correspondents and writers from around the world Broadcast on Radio 4 on Thursdays at 11:00 and Saturdays at 11:30 and on BBC World Service Listen to the programme Download the programme

Several passengers who don't fancy walking around to the right side of the train through the passenger underpass have jumped down onto the tracks with their luggage and are milling about on the rails.

The policeman - deep in conversation with the man who drew his attention to photo-gate - is magnificently unconcerned with this dangerous behaviour.

He is on anti-terrorism duty and his mission is accomplished. The plucky but foolhardy passengers are gently driven back off the tracks by a jovial sleeping car attendant. Grumbling as they hoist their heavy bags back up on to the platform, they disappear into the chaos of the crowd.

There is a new confidence about the security forces in Egypt which reflects the fact that their man, Abdel Fattah al-Sisi, a former military intelligence officer, is firmly in control of the presidency.

He now awaits the election of the kind of parliament from which seldom is heard a discouraging word. By December when Egypt's extraordinarily drawn-out election process is finally over, he will have one.

Revolution and counter-revolution have come full circle to leave Egypt pretty much where it was before all the upheaval, governed by a former military officer with the backing of the powerful heads of the armed forces.

It is a form of government that can only operate by intimidating its critics - and by jailing them if it has to.

Image copyright AFP

To justify the high-handedness Sisi and his men point to the way in which the fires of Islamist extremism have consumed the states of Syria, Libya and Iraq. Only their iron grip, they argue, stops Egypt from going the same way.

So this is a country where a military court can jail a young person for three years on a charge of doctoring a picture of the president to show him with the ears of Mickey Mouse.

A country where a video-tape editor can disappear after popping out of his office to buy a spot of lunch and not be seen again.

A country where a writer and broadcaster I've known for years suddenly finds herself facing the prospect of trial on pain of imprisonment for questioning just how free the country is. You will spot the irony where the police did not.

There will be no surprises in the parliamentary elections here - the rules don't permit them. And plenty of Egyptians are happy to sacrifice a little democracy for a little stability.

The problem is of course, that you never quite know how much freedom you have to surrender in that sort of deal, or how and when you might get it back.

Our train set off on time in the end and headed into the dark uncertainties of the night. Egypt is on a similar journey itself, except it can't be sure quite what the destination may turn out to be. Or what price it might have to pay to get there.

How to listen to From Our Own Correspondent:

BBC Radio 4: Thursdays at 11:00 and Saturdays at 11:30

Listen online or download the podcast.

BBC World Service: At weekends - see World Service programme schedule or listen online.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.