Two Croatian commanders of the 1990s war against the Serbs have received lengthy jail terms for war crimes in a landmark verdict that incriminated the entire Zagreb political leadership of the time for waging a campaign of terror, bombing and murder aimed at ridding the country of its large Serbian minority.

Judges in The Hague found Ante Gotovina and Mladen Markač guilty on eight of nine counts for commanding operations that included the shelling of civilians, the torching of Serbian homes in south-west Croatia, the murder of hundreds of elderly Serbs and the forced exodus of at least 20,000 from the Serbian minority rooted in the Dalmatian hinterland for centuries.

It represents the most damning verdict on Croatia's conduct of the 1991-95 war in 17 years of investigations by the international war crimes tribunal for the former Yugoslavia.

Gotovina commanded the August 1995 operations that ended a four-year Serbian insurgency and partition of Croatia and effectively won the war for Zagreb. He was given a 24-year jail sentence. Markač, who commanded police paramilitaries in the same Operation Storm, was jailed for 18 years.

A third accused, Ivan Cermak, was acquitted.

The verdicts were met with outrage in the cities of Croatia where thousands of former fighters rallied to watch the trial outcome transmitted from The Hague on giant screens.

The result represents a disaster for Croatia and a triumphant vindication for Serbia. The Croats have been told that the decisive victory of the war, sealing their independent statehood, was a war crime.

The judges went further than finding two former generals guilty, ruling that the regime of the late President Franjo Tudjman planned a campaign of systematic violence to empty south-western Croatia of its Serbian minority in order to resettle the region with ethnic Croats.

The current government in Zagreb was stunned by the sweeping verdict.

"Having learned that [the tribunal] has found that the Croatian state leadership acted in a joint criminal enterprise, I must declare that to the government of Croatia this is unacceptable," said Jadranka Kosor, the prime minister. "Our view of the operation is absolutely clear: it was a legitimate military and police action to liberate Croatian state territory from occupation."

President Ivo Josipović described the verdict as "shocking".

The outcome of the three-year trial creates major problems for Kosor. She is squeezed on one side by a nationalist backlash supported by a recalcitrant and powerful Catholic church, and on the other side by pressure from Brussels to be more proactive on war crimes and the treatment of minority Serbs as Croatia aims to conclude its negotiations to join the European Union. Kosor is also seeking re-election later this year.

In the most telling findings, the panel of judges found that the 1990s regime, led by the hardline Tudjman, plotted and then carried out the policy of shelling, torching and killing to force a Serbian exodus.

Almost 200,000 Serbs fled Croatia in the summer and autumn of 1995.

"Croatian forces committed acts of murder, cruel treatment, inhumane acts, destruction, plunder, persecution and deportation. There was a widespread and systematic attack directed against this Serb civilian population, [creating] an environment in which those present there had no choice but to leave," the judges found.

While focused on Gotovina and two fellow accused, the trial has been the main opportunity for probing the strategy and conduct of the wartime leadership of Croatia. The key political leaders such as Tudjman, the defence minister Gojko Šušak and the army chief Janko Bobetko all died before having to face the courts. The Gotovina case has served as a proxy trial.

A former French legionnaire who returned to Croatia when the war erupted in 1991, Gotovina commanded the central operations that won the war for Croatia in August 1995, retaking the strategic town of Knin in the Dalmatian hinterland. Knin was the seat of the four-year-old Serbian rebellion that left Croatia crippled. Gotovina was indicted for war crimes in 2001. Previously tipped off by contacts in the Croatian government, he went on the run for four years until arrested in a Tenerife hotel at the end of 2005. For years the Croatian government blocked attempts to locate him until it performed a U-turn to unlock its EU negotiations.

For many Croats, especially on the right, Gotovina is a national hero. Catholic bishops this week denounced the tribunal, accusing it of deliberately confusing victim and aggressor.

Operation Storm was prosecuted at lightning speed, highly successfully with strong American backing. It represented the denouement to the four-year war. A fortnight earlier at Srebrenica in Bosnia, the Serbs had committed the worst massacre of the Yugoslav wars, murdering almost 8,000 Muslim males.

Following the Croatian rout of the Serbian rebels, the war was over and Croatia's independence secured. Bosnia's fragile peace pact was struck three months later.

In the wake of the victory Croatian forces went on the rampage, torching the homes of elderly Serbs who did not flee and murdering hundreds.