A thriving city is under heavy and indiscriminate artillery fire, snipers pick off the unwary in the empty streets, numberless civilians live in fear of sudden death even though they do not bear arms, the dead are buried after nightfall, the wounded are treated by torchlight – if at all – and the watching world sits by in mute indifference and does very little to alleviate the suffering.

History does repeat itself. Twenty years ago, scenes such as those were daily occurrences in the Bosnian capital of Sarajevo as the Serbs tried to impose their authority on their hated rivals the Bosnian Muslims as the Yugoslav federation disintegrated. Today similar scenes are being enacted in the Syrian industrial city of Homs as forces loyal to President Bashar al-Assad attempt to snuff out opposition to his increasingly despotic regime by using tanks and heavy artillery. And once again the world seems powerless to act, castrated by the need to stick to the arcane rules of diplomacy.

The only difference this time around is the extent of the coverage. Back in the 1990s there was 24-hour television but few people watched it. The news footage was depressingly monotone and people simply switched off. Last week and throughout this weekend, though, the action in Homs is kept up-to-date courtesy of social networking sites such as Facebook and Twitter. Thanks to ubiquitous mobile phones and cameras, what is happening there can be flashed round the world in seconds.

Whether or not that changes anything is a moot point, but at least we know what it happening. Whether or not we care is debatable, but at least the actions of the Syrian army cannot remain out of sight and out of mind.

Just over a year ago I was in Syria conducting some historical research and although the country was still tolerably peaceful the tensions were obvious. Then, suddenly at the end of last March, it all began to kick off. While driving back from the northern city of Aleppo to the capital, Damascus, military roadblocks kept us out of Homs where we had stayed overnight earlier in the week.

The soldiers and police were twitchy, ordinary people were suddenly tongue-tied and nervous and officials were being unnecessarily officious. It struck me that it was the beginning of a bad time for the country, but even as things were starting to fall apart it would have been impossible to contrast it with the internecine conflict that had blighted the Balkans in the 1990s, within memory and just as scary. This weekend that comparison is unavoidable.

A Tale of Two Cities: Sarajevo and Homs

It is not difficult to see why the recent bombardment of Homs is eerily similar to what happened in Sarajevo in 1992. The siege of the Bosnian capital was conducted by the Serb army using artillery, mortars, heavy machine guns and rockets, firing their ordnance into the city from the surrounding hills and killing indiscriminately.

It lasted for more than three years and after Stalingrad in 1942 remains the longest-running siege in modern history. More than 10,000 people were killed, many of them children, and the siege itself became a dreary metaphor for the Serbs' attempt to create a new republic which would include parts of Bosnia and Herzegovina.

The tactics being used by the Syrian army around Homs are similar – to crush the opposition, in this case the mainly Sunni Free Syrian Army (FSA), and to destroy a city which is both strategic and symbolic. For the Serbs the capture of Sarajevo would have fulfilled the same purpose. Not only was it an important prize in their push to create a new Serb republic, but the city also quickly became an international symbol of Bosnian Muslim resistance.

Ethnic Cleansing: Then and Now

There is no doubt the Syrian army is not always being indiscriminate in its bombardment of Homs – just as the Serb army took great care with its targeting during the siege of Sarajevo. When journalist Marie Colvin was killed by shellfire in Homs last Wednesday, her whereabouts had been betrayed by the signal from her satellite phone. Syrian commanders knew exactly where she was. They also know that the main suburbs being targeted – Baba Amro and Bab Sebaa – are Sunni enclaves and therefore home to FSA units.

One of the causes of the fighting in Syria is sectarian in origin. The government is mainly from the Shia-backed Alawite sect; the majority of the insurgents are Sunni. Both have vested interests in preventing the other from gaining political ascendancy and that helps to explain the ferocity of the army's response to the insurrection. The conflict has all the ingredients of a civil war with the sides occupying separate halves of a religious divide.

Religion also intruded into the fighting in Bosnia when it erupted in 1992. Initially it was a territorial conflict fought by Serbs on one side and Bosnian Muslims and Croats on the other as each attempted to gain control of swathes of territory following the earlier break-up of Yugoslavia. Yet such was the ferocity of the passions unleashed that it quickly became a sectarian conflict with both sides – but mainly the Serbs – committing atrocities against the civilian population.

Incidents such as the mass murder of 8,000 Bosnian Muslims at Srebrenica in the summer of 1995 came to symbolise the brutality and senselessness of the whole war. When asked why his soldiers had committed the atrocity, a Serb commander responded that they had always hated the Muslims and this was as much about age-old revenge as about the need to kill the enemy. Syrian army commanders probably feel the same about their Sunni victims in Homs.

How the world watched and waited: TheN and Now

There are also uncanny similarities between the international response to Bosnia in 1992 and to Syria now, and analysts including Soner Cagaptay and Andrew Tabler of The Washington Institute, an international relations think tank, have been quick to make them.

While they argue that there are basic differences in the nature of the earlier conflict, some elements, such as the need to protect civilians, remain the same. They said: "Any international groups looking to provide humanitarian intervention to protect vulnerable civilians in enclaves 'liberated' by the opposition [in Syria] should draw on lessons from Bosnia in the 1990s."

One of the lessons learned should be how not to do it. The West is not planning to intervene in Syria for several reasons – the opposition of Russia and China, US caution, lack of unified Arab support and the absence of an achievable outcome.

Several options have been mooted, including the creation of "safe havens" protected by air power, and the intervention of a peace-enforcement army under Arab command, but none of them are likely to be implemented in the foreseeable future.

Similar confusions and lack of focus dominated the discussion about military intervention in Bosnia. As a result, when the decision was taken to insert a UN protection force (Unprofor) the operation was quickly overtaken by "mission creep". In June 1992, the UN Security Council passed Resolution 761 to enable a handful of lightly armed blue-helmeted peacekeepers to take control of Sarajevo airport, entering the country from neighbouring Croatia. But within weeks, they in turn had to be protected from Serb attacks and the force quickly became impotent.

What had started as a solution became a fresh problem and it was not until 1995 that the use of Nato air strikes forced Serb leader Slobodan Milosevic to the negotiating table. In that time it took more than 100 United Nations resolutions before anything was achieved. That history should send a powerful message to any government planning an intervention in Syria.

There is no point sending a peacekeeping force unless there is peace to keep. It also needs to be properly armed and equipped and to have a mandate to shoot back if it comes under fire. It would need the support of the Syrian people and should not be seen as supporting the FSA. Ideally it should also be Arab-led.

One other factor intrudes. In the 1990s there was international outrage about the atrocities in Bosnia, and people across Europe demonstrated against government inactivity. So far that has been absent from what is happening in Syria. Without the backing of public opinion, any intervention will be hampered before it begins.

Bringing the Guilty to Justice

It took time and the emergence of another Balkans conflict in Kosovo at the end of the 1990s before the perpetrators of the worst war crimes were eventually brought to justice. From the outset of the war, it was clear that crimes were being committed in Bosnia and that these included genocide and ethnic cleansing. It was also clear that the perpetrators had to be brought to book, and as early as 1993 an International Criminal Tribunal for the former Yugoslavia (ICTY) was established in The Hague by the UN.

But it was not until the following decade that the first trials began as military and political leaders were arrested. Some of the trials are still taking place, including that of former Serb leader Radovan Karadzic, who was not arrested until the summer of 2008.

As a result of the complexities of the war itself and the fact the crimes took place up to 20 years ago, it has been a lengthy and time-consuming legal process – but there has been some progress. Ten years ago the president of the new state of Serbia, Boris Tadic, made an apology in Bosnia and Herzegovina to all those who suffered crimes committed in the name of the Serb people and last summer the Serb parliament formally apologised for the massacre at Srebrenica.

Reconciliation has been attempted here, and by and large it has worked. While Homs was under fire yesterday, it was business as usual in Sarajevo. Little evidence remains of the wartime damage – buildings have been rebuilt, shopping malls abound and in two years' time it will be Europe's city of culture. It would be good to think that a similar sense of understanding could be visited on Syria, but with Assad unwilling to heed Western calls to stand down that would be unduly optimistic.

Without a doubt war crimes have been committed in Syria – crimes against humanity, ethnic cleansing and genocide in Homs this year and in Hama in 1982. Assad and his cronies have been implicated in them, but the mood in the country at present is one of revenge.

Having seen what happened to fellow dictator Muammar Gaddafi of Libya, Assad might come to the conclusion that his best bet is to tough it out and take his chances with the mob. Unless he is toppled by the intervention of the West that might be his only option.