They showed the clerks their polling cards, had their signatures checked against their original registrations, and were handed their precious, foot-long square of blue paper. They stood looking at it, turning it over in their hands, before being gently guided by officials to a voting booth.

It is a fair bet that no British voter ever goes to vote carrying the national flag, complete with flagpole. They do here. At this polling station, in the Tripoli satellite town of Janzour, many had dressed up in their best clothes for the day.

"It is like a wedding for the whole country," said Muna Munir, in a jewelled headscarf and sandals. "We were always longing to be like other countries, free countries. Well, now we are."

It's not quite that simple, of course. Down the road from these happy scenes was a much stiffer test of Libyan democracy.

The old naval academy in Janzour has become a refugee camp for Libya's ethnically cleansed: the residents of what used to be a town called Tawargha, accused, often falsely, of "collaboration" with the Gaddafi regime during the revolution, now driven out, their houses and streets destroyed.

The Tawargans live here in what one of them, Ahmed Mohammed, calls "complete misery," fourteen to a room, men and women mixed together, subject to regular reprisal raids by the militias who are in many respects the real government of Libya.

The interim government alternates between shrugging its shoulders and wringing its hands.

Yet there is a polling station here. And what's more, it is busy. Though the mood is far from the celebrations elsewhere in Janzour, and though they have every reason to fear and distrust the "new Libya," the Tawarghans are giving this election a go.

"Despite the situation we're in, we still want to take part," says Mr Mohammed. "This is part of our participation in the revolution. We just hope the elections will give Libya a government strong enough to do something about our plight."

It's an excellent sign – one replicated in other parts of Libya where there were fears the elections would flop. In Benghazi, a raid on a polling station and the burning of ballot papers failed to prevent a generally high turnout.

And the Tawarghans' wish – a stable government which can keep them safe – is something that many other voters, too, told us they hoped the elections will deliver.