Updated

In a stunning reversal, U.N. 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, who had been sentenced to 27 years in 2011 after being convicted of crimes including murder, inhumane acts and persecution, was ordered 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 supports 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.

Perisic, wearing a dark suit and tie, looked down and raised his eyebrows as Presiding Judge Theodor Meron said his convictions were being overturned.

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

Mladic 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 a landmark 2007 ruling, the U.N.'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 to the tribunal that acquitted Perisic.

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

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

Milosevic died in 2006 while on trial in The Hague for atrocities committed by rebel Serbs throughout the Balkan wars of the 1990s.