They had taken place at a makeshift hospital, in a tent marked clearly with the symbols of the Islamic Crescent. Some of the dead were on stretchers, attached to intravenous drips. Some were on the back of an ambulance that had been shot at. A few were on the ground, seemingly attempting to crawl to safety when the bullets came.

Around 30 men lay decomposing in the heat. Many of them had their hands tied behind their back, either with plastic handcuffs or ropes. One had a scarf stuffed into his mouth. Almost all of the victims were black men. Their bodies had been dumped near the scene of two of the fierce battles between rebel and regime forces in Tripoli.

"Come and see. These are blacks, Africans, hired by Gaddafi, mercenaries," shouted Ahmed Bin Sabri, lifting the tent flap to show the body of one dead patient, his grey T-shirt stained dark red with blood, the saline pipe running into his arm black with flies. Why had an injured man receiving treatment been executed? Mr Sabri, more a camp follower than a fighter, shrugged. It was seemingly incomprehensible to him that anything wrong had been done.

The corpses were on the grass verges of two large roundabouts between Bab al-Aziziyah, Muammar Gaddafi's compound stormed by the revolutionaries at the weekend and Abu Salim, a loyalist district which saw three days of ferocious violence.

The United Nations has issued an urgent call for restraint by both sides in the bloody and bitter endgame to the civil war. But the thirst for vengeance has been difficult to control, to which the morgues, hospitals and the urban killings fields of the Libyan capital bore testimony.

The dire warning in Col Gaddafi's latest broadcast that the population of Tripoli would be persecuted by the revolutionaries and women would be raped in their homes is unsubstantiated, as are similar claims by his official apologist, Moussa Ibrahim.

It is also the case that the regime has repeatedly unleashed appalling violence on its own people. But the mounting number of deaths of men from sub-Saharan Africa at the hands of the rebels – lynchings in many cases – raises disturbing questions about the opposition administration, the Transitional National Council (TNC) taking over as Libya's government, and about Western backing for it.

The atrocities have apparently not been confined to Tripoli: Amnesty International has reported similar violence in the coastal town of Zawiyah, much of it against men from sub-Saharan Africa who, it has been claimed, were migrant workers.

The Independent understands that the suspected atrocities by rebel fighters have been raised with members of the TNC in recent days by British officials, who made clear their "concern" at the reports coming out of Tripoli and the expectation in London that anyone suspected of war crimes will face trial. The Foreign Office underlined that the apparent executions of pro-Gaddafi soldiers were as yet unverified.

A spokesman said: "We are aware of reports, but have no means of verifying them. We condemn all human rights abuses. The TNC leadership has made clear the need to avoid violence and reprisals and has repeatedly said that anyone found guilty of crimes will be held to account. We have emphasised the importance of this in our conversations with them. This is in stark contrast to Gaddafi, who continues to launch indiscriminate and violent attacks on the Libyan people."

But, for some on the ground in Tripoli, a different view has taken hold. Since the start of the uprising last February the opposition has tried to portray the conflict as waged by patriotic Libyans against the dictator's foreign hired guns. A few of the tales took fanciful turns, such as that about the crack team of female snipers, either Serbian or Colombian, depending on the version. But it was black males, very often migrant workers, who paid the lethal price after being accused of being mercenaries.

Only a few of the dead found at the roundabouts yesterday were in uniform. However, regime forces have often worn civilian clothes during combat in Tripoli. The street-fighting for Abu Salim was particularly fierce with regime snipers taking a steady toll among the ranks of al-Shabaab volunteer fighters. The losses, and frustration at the continuing stubborn resistance by the enemy after an entry into the capital greeted with celebration by residents, has led to something approaching fury among some of the revolutionaries in the last few days.

"They were shooting at us and that is the reason they were killed," said Mushab Abdullah, a 35-year-old rebel fighter from Misrata, pointing at the bodies. "It had been really tough at Abu Salim, because these mercenaries know that, without Gaddafi to protect them, they are in big trouble. That is why they were fighting so hard."

His companion, Mohammed Tariq Muthar, counted them off on the fingers of his hand: "We have found mercenaries from Chad, Niger, Mali and Ghana, all with guns. And they took action against us."

But, if the men had been killed in action, why did they have their hands tied behind their back? "Maybe they were injured, and they had to be brought to this hospital and the handcuffs were to stop them from attacking. And then something went wrong," suggested Mr Abdullah.

Ethnic Libyan "collaborators", too, have been the subject of the punitive attention of the revolutionaries. The prison at Abu Salim, a place of fear where 1,200 prisoners were slaughtered by the regime in 1996, had its doors flung open by the revolutionaries on Thursday, letting 4,000 inmates free. Now there is talk of using the complex for captured Gaddafi troops.

Meanwhile, Ahmed Safar Warfalla was being held in a temporary "cell", a locked room at a school in the suburb of Tajoura. Mr Warfalla has been accused of spreading Gaddafi propaganda. Three Chadian "mercenaries" kept at the same place had already been transferred to jail and the local militia was considering what to do with him.

"They accuse me of a crime, but this is what I did," said Mr Warfalla taking out a copy of the Koran from his pocket and pointing it to the sky. "Allah and Libya," he shouted. "They have Nato technology? This is Arab, Muslim technology. We shall not be defeated."

After a brief consultation, the militia decided to let Mr Warfalla go. "What is the point of keeping him; the man is mad!" said Adussalem Mohammed Ashur. "If it was me and I was a prisoner of Gaddafi then I would not have come out so easily. People have disappeared for saying things."

Amnesty International said that it had uncovered evidence that regime forces had killed detainees held at two camps in Tripoli. One of the attacks took place at a military camp in Khilit al-Ferjan where 160 detainees attempted to get away after the guards told them that the gates were unlocked. "As the detainees barged through the hangar gates, two other guards opened fire and threw five hand grenades at the group," said the human rights group in a report. Twenty-three of the prisoners managed to make good their escape and were able to receive treatment at a Tripoli hospital.

Meanwhile, RAF Tornado GR4 warplanes fired Cruise missiles at a bunker in Sirte, Col Gaddafi's hometown which is continuing to stave off rebel attacks. Ahmed Bani, a military spokesman for the TNC, said "Maybe this will help. Maybe the mercenaries there will run away. This will allow the local people to rise up and we can bring this to a conclusion."

Belfast Telegraph