The two chairs were placed side by side. One was fitted with straps and manacles, the other a seat of long nails. They had been taken from a regime interrogation centre, but now had a sign stating: "Presents for the new President if he mistreats his people."

They were the only attempts at humour amid exhibits chronicling savagery and sorrow at the Martyrs' Museum in Misrata – the city which became a symbol of defiance as it stood bloody but unbowed through months of a brutal siege by Muammar Gaddafi's forces.

"They were my neighbour's children, killed by tank fire when the family was trying to flee," said Ali Shenaba, the founder and manager of the museum, pointing at photographs of two pairs of boys and girls, aged between four and 10.

"There was no need to do that, do they look like rebel fighters? Those regime men were just wanting to kill, they had left behind civilised society."

Mr Shenaba's own house on Tripoli Street, on the urban frontline, was destroyed and the extended family of 12 are now sharing a temporary accommodation.

They hope that the impending elections on 7 July – when Libyans will vote for a General National Congress to replace the interim National Transitional Council – will pave the way for a government which will lead Misrata and Libya towards the prosperity that a small population with large oil resources deserves. Petroleum production, which has re-started at limited capacity, is already bringing in $1.5bn a month. But precious little of that trickles down to the ordinary people, runs the complaint.

Future rulers who fail in their duties can expect short shrift. "We did not go through so much suffering, lose so many young lives, to tolerate anyone who abuses his power again," said Mr Shenaba. "But it's not just that. This city has suffered so much for the revolution, we need housing, we need jobs, we need help for our warriors who have lost arms, legs, the families of those who have lost lives. We cannot be ignored on this."

"Free Libya" is now effectively under the control of armed and often competing groups of former rebels who each claim to have played a decisive part in the overthrow of Gaddafi's regime. But there is acknowledgment, sometimes grudging, of Misrata's claim that the revolution would have been stillborn without the tenacious resistance of its people against daily bombardment.

Some of the militias are engaged in turf wars. The city of Zintan, which has 1,500 men under arms, and is the only matching power to Misrata in the west of the country, is also in control of a prized national "asset" – Gaddafi's son, Saif al-Islam.

Misrata, while not averse to flexing its military muscle, has taken deliberate political and commercial steps to show autonomy from the government in Tripoli. The port city held elections for a council in February – the first such ballot anywhere in Libya since the coup which brought Colonel Gaddafi to power four decades ago – without bothering to consult the ruling National Transitional Council (NTC) in Tripoli. That council, pointing to Misrata's mercantile history, subsequently signed a trade agreement with Malta, its nearest international neighbour, without involving Tripoli.

I arrived in Misrata last April on a fishing boat carrying food and medicine to a dockyard under fire. Then, at the height of its onslaught, the regime was determined to choke off the only lifeline the defendants had left – the sea. The house where we stayed that night was hit by missile fire the following day, injuring members of the family who had hosted us.

In the east of th city, trucks now form queues to Qasr Ahmed, Libya's biggest container port, with contractors busy ticking off inventories. Mohammed Abu Sameh, who I recalled leading a bunch of teenage rebels out of a burning building, is one of them. Commercial profit, he insists, is not the main motivating factor for Misrata. "Look, we didn't join the revolution because we were poor, we were always a place which did well because we have had business links with other countries.

"No, we joined because we believe the people should know what happens to the country's wealth and we believe in democracy. What we now wonder is whether those who took power in Tripoli believe in the same things.

"Oil production has started again and there is now a lot of money coming in, where is that all going? The NTC does not tell us. After the election we must open up the accounts and look at where the money is going. Gaddafi used the oil money to make his family and friends rich and stupid wars in places like Chad. We want ordinary Libyans to benefit now."

This feeling that Libya, unlike some other countries of the Arab Spring, does not need the money of foreign countries which may seek to spread their influence, has become increasingly prevalent, especially in relation to Qatar and Saudi Arabia, which led the bankrolling of rebels last year. They are doing the same, it is claimed, with Islamist groups for the election.

The Martyr's Museum, which has attracted hundreds of visitors from within and outside Libya, displays large photographs of the Emir of Qatar and the Heir Apparent.

Looking at these, Basma Husseini, visiting with her two children, reflected: "I hear they were very good to us when we were struggling against the tyrant. Maybe in the future we should pay the money back. But now I think we should decide our own future.

"There are certain parties, people, whose policies worry me. I think women should behave modestly in Libya, we are Muslims. But I want my daughter to have education like my son, the same opportunities. The Libyan people will decide what they want and the government should look after them."

Abdul Munam Omar is not so sure that he will be looked after. The 20-year-old student lay in his bed at Al Hikma Hospital with intestinal damage and part of his right arm torn off – injuries suffered while fighting in Tripoli Street last year. The doctors in Misrata thought he would lose the use of his arm, but a German doctor managed to restore partial use. He still needs further surgeries for that, as well as the stomach wounds.

The NTC has been paying for surgery abroad for fighters and civilians, but the rules were altered after claims that the system was being abused with people using it for cosmetic treatment and dental work, especially in countries like Jordan, where there are no visa requirements for Libyans.

"I regret taking part in the fighting now because of what has happened to me. I wanted to finish my education and get a good job, but I don't know whether that is going to be possible. My family are poor – they can't afford the medical care – so I don't know what will happen if the government does not pay. It is very depressing for me," said Mr Omar.

There are hundreds of physically handicapped people in Misrata. But that is not the only scar left by the war. A recent World Health Organisation (WHO) study found 21,000 out of the city's population of 250,000 were suffering from psychological trauma.

Dr Mustafa Shegmani, a clinical psychologist who qualified at Rennes University in France, is in charge of a team of 24 specialists who have treated more than 700 patients, aged between two and 80 years in the last three months.

"During the fighting I was helping out other doctors dealing with emergency cases at the hospital. There were casualties, fatalities, body parts on operating tables, stretchers," he recalled. "That room was later turned into somewhere the doctors could get some rest. I walked in one day and began to have flashbacks, bodies, blood. So I have a little personal experience of what people are going through myself."

There will be long-term problems which need to be addressed, Dr Shegmani stressed. "At the moment we don't really have a government, no real authority, which makes things even more difficult. The new government will have to make sure that they provide the money for all the proper treatment which will be needed in the future.

"We have neurosis, anxiety, OCD (obsessive compulsive disorder), physical symptoms like diarrhoea. Children are some of the worst affected. There are young fighters who have bursts of anger, drug and alcohol abuse. We are treating their families. But we are also treating regime soldiers who are now prisoners – they have the same kind of problems, they are also suffering from guilt."

The regime forces are not the only ones suffering from a degree of guilt. The population of neighbouring Tawargha, which was accused of collusion with the regime, were driven out and their homes destroyed. Many were killed, others put in prison.

What happened casts a cloud over Misrata, with charges that the vengeance meted out on Tawargha's black community had the underlying motivation of racism. Misratis defend their action, insisting that it is they who were the victims of aggression. But a few have now begun to speak about their unease at what took place.

"It is still difficult, but maybe with time we can start examining this. Some from Tawargha did very bad things, but there are innocent people among them who suffered as a result. We should have been more careful, some bad things happened," said Abdulhamid, who did not want his full name published.

"Maybe one day the names of Tawarghans will be in the museum."

Some former fighters have taken a new path to ensuring future accountability for those in power and trying to prevent abuse. Emad Shlak met foreign journalists in Misrata and has now decided to become one himself.

Mr Shlak's new life as a cameraman is not entirely safe. He had known Tim Hetherington and Chris Hondros, photojournalists who were killed in Misrata, and he worked with Marie Colvin, who died later in Syria.

"I was very sorry about all of them and very upset when I heard about Marie. But many of us realised that the reason we got help from the outside world was because of these journalists. The governments we have after the elections will need watching. Foreign media will not be here, so that is what we will be doing."

Despatches: Bloodshed, weeping and Defiance

The Independent's reports from the front line of the Libyan conflict:

12 April 2011 "The missiles came in at 3.20am, exploding in regular bursts, smashing down walls and shattering windows. The possible target was an oil depot, but again it was the civilians who paid a lethal price – as they had done so often in Misrata. Five bodies were dug out of the rubble and another 20 were wounded. The attack had taken place hours after Gaddafi had supposedly accepted a peace deal to end this vicious war."

13 April 2011 "There has been no let-up in the ferocity of the strife in this western city which has become the symbol of defiance for the revolution. The calm of an early morning of sunshine and breeze was soon shattered by booming echoes of missile fire from Muammar Gaddafi's forces... followed by the prolonged sound of airplanes above. But the real violence was unfolding in the centre of the city, at Tripoli Street, which has become an arena for enemies meeting in implacable hatred. Part of the thoroughfare is a snipers' alley for the regime, where civilians, including children, have been shot. Other stretches are a free-fire zone for both sides with buildings changing hands by the hour."

15 April 2011 "The official graveyard for the district has been too dangerous in the last fortnight because of sniper fire. The [funeral] service became an occasion for outpourings of anger and grief. Mourners wept, as others shouted 'Misrata will be your graveyard, O Gaddafi'."