Croatia has seen the two men as national heroes who justly recaptured part of its homeland, known as the Krajina region, where Serbs and Croats had lived for generations. Armed and financed by Belgrade, the Serbian capital, the region had broken away from Croatia early in the war and remained occupied by Serbian forces for several years.

But by 1995, with the United States and other Western nations seeking to end the war, Croatia prepared a counteroffensive, called Operation Storm, with the Pentagon closely involved in the planning.

The four-day military campaign was criticized by United Nations military observers for the indiscriminate bombing of cities. In its aftermath, Croatian fighters and others went on a rampage of looting and burning of homes and livestock, and poisoned wells to make sure that Serbs would not return, witnesses told the court. About 150 civilians were killed in military actions, but experts told the court that at least 350 people had died, many of them in acts of vengeance against older or disabled Serbs who had not been able to flee across the border to Serbia.

In overturning the convictions, the tribunal found that the Croatian forces, under the overall command of General Gotovina, had aimed largely at legitimate military targets. It also found that he and General Markac did not control the bands that looted and murdered, but had instead warned against taking revenge on civilians.

The ruling also dismissed the overriding legal argument for the convictions: that the two men were part of a criminal conspiracy conceived by the Croatian president at the time, Franjo Tudjman, to expel all Serbs from Krajina by spreading fear. The judges said they had not found enough evidence of such a conspiracy.

Analysts say the generals were the only men to be held accountable for the excesses of Operation Storm because Mr. Tudjman and his inner circle were all dead by the time the case came before the tribunal.

The prosecution said that while it deplored the ruling, it did not intend to challenge it.