THE HAGUE, Netherlands -- In a stunning reversal, UN appeals judges on Thursday acquitted the former chief of the Yugoslav National Army of aiding and abetting atrocities by rebel Serbs, including the Srebrenica massacre, by providing them with military aid during the Balkan wars.

Gen. Momcilo Perisic, a former close ally of ex-Yugoslav President Slobodan Milosevic, had been sentenced to 27 years in 2011 after being convicted of crimes including murder, inhumane acts and persecution. The judges Thursday ordered him freed immediately.

The judgment is a rare victory for Serbs at the Yugoslav war crimes tribunal, where most of the convicted suspects have been rebel Serbs in Bosnia and Croatia. It also supported Belgrade's often-stated assertion that it did not deliberately assist in Bosnian Serb atrocities and underscores how hard it is for international courts to prosecute senior officials seen as pulling the strings but not acting directly.

The court's most ambitious attempt to link Belgrade to Balkan war atrocities ended inconclusively when Milosevic died of a heart attack in his cell in The Hague in 2006 before a verdict could be reached in his trial for fomenting violence throughout the region as the former Yugoslavia crumbled.

While linking senior officials in one country to crimes by rebels in another is difficult, it can be done.

Another high-profile case that played out in a different Hague courtroom, the prosecution of Charles Taylor, saw the former Liberian president convicted of aiding and abetting rebels in neighbouring Sierra Leone during that African nation's brutal civil war. Taylor has appealed his conviction and 50-year sentence.

Perisic, wearing a dark suit and tie, looked down and raised his eyebrows as Presiding Judge Theodor Meron said his convictions were being overturned in a 4-1 ruling by the five-judge appeals panel.

His acquittal on appeal is final and cannot be further appealed. Prosecutors could not immediately be reached for comment.

It has long been known that Belgrade provided arms and other equipment to Bosnian Serb forces, but Meron said the aid was for the Bosnian Serb "war effort" and prosecutors failed to prove it was given with the "specific intent" for forces led by Bosnian Serb military chief Gen. Ratko Mladic to commit crimes.

Perisic's original conviction marked the first time the UN court had found a civilian or military officer from Serbia guilty of war crimes in Bosnia, and was seen as highlighting the Yugoslav army's far-reaching support for Serb forces in both Bosnia and Croatia.

Mladic -- originally an officer in the Yugoslav army -- is on trial in the same court on charges including genocide for allegedly masterminding the 1995 Srebrenica massacre in which some 8,000 Muslim men were murdered by Bosnian Serb forces in Europe's worst massacre since World War II.

Meron said Perisic's aid to Bosnian Serb forces "was remote to the relevant crimes" committed by rebel Serbs in Bosnia.

But Meron added a note of caution for leaders who would commit crimes through proxy forces.

"This conclusion should in no way be interpreted as enabling military leaders to deflect criminal liability by subcontracting the commission of criminal acts," he said.

In Belgrade, Serbia's deputy war crimes prosecutor Bruno Vekaric praised Perisic's acquittal, "most of all because the council of judges did not find a link between the Yugoslav army and the war crimes that took place in the former Yugoslavia, and because it found that Gen. Perisic acted in accordance with the rules of war."

In Bosnia, there was dismay among survivors of the Srebrenica massacre who watched the ruling on television.

"What did we believe in? We had faith in The Hague tribunal, we believed in justice, but there is no justice," survivor Suhra Sinanovic said.

In a landmark 2007 ruling, the UN's highest judicial organ, the International Court of Justice, also cleared Serbia of genocide in Bosnia, but said the country's former government should have stopped the 1995 slaughter of some 8,000 Muslims in Srebrenica.

The International Court of Justice is a separate court from the tribunal that acquitted Perisic.

Perisic also was acquitted Thursday of failing to punish rebel Serbs in Croatia who shelled the capital Zagreb in May 1995.

Perisic was Serbia's military chief until 1998 -- three years after the Bosnian and Croatian wars ended. He turned against Milosevic after the Bosnian war and warned Milosevic's regime against fomenting conflict in Kosovo, where fighting erupted after he left his post.

In Bosnia, another Srebrenica survivor, Zijad Smajlovic, insisted that the court had enough evidence to convict Perisic.

"All human and technical resources of the Yugoslav Army were used in perpetration of war crimes and genocide in Bosnia," Smajlovic said. "Not only in Srebrenica, but in Bosnia in general."