Depfa Bank, Deutsche Bank, JPMorgan and UBS had appealed against a landmark verdict from December 2012 ordering the seizure of 89 million euros ($123 million) and fines of 1 million euros for each of the banks.

The original trial was the first of its kind in Italy, where hundreds of local governments entered opaque and risky derivatives deals that turned sour. Many of them have since taken lenders to court to solve their disputes.

The appeals court said on Friday that the four banks had no case to answer. It cancelled the fines and seizure of funds, and also acquitted nine bank employees who had been handed suspended jail sentences of up to eight months.

Milan prosecutor Piero De Petris last month asked for the individual fines and the seizure to be upheld, with only a small reduction for JPMorgan. He also asked for jail sentences of about six months for four of the nine bank employees.

The prosecutor has 90 days to challenge Friday's verdict by filing an appeal with Italy's highest court. De Petris said a decision would take some time.

"One must first read the sentence," he told reporters.

The case relates to a swap contract signed by the city of Milan council when it issued a 1.68 billion euro 30-year bond in 2005. The banks were accused of making 100 million euros in illicit profit and lying about the risks linked to the deal.

Deutsche Bank, JPMorgan and UBS all welcomed the verdict, while Depfa made no immediate comment on the decision.

"The only thing better than saying there is no case to answer would be an apology," UBS's lawyer Fabio Cagnola told journalists.

Italy's 2014 budget law has rendered permanent a ban introduced by the Treasury in 2009 to prevent local authorities from signing new derivatives contracts, though they can still restructure old deals.

In June last year a total of 275 local governments held 536 derivatives contracts on underlying liabilities worth 27.5 billion euros, Treasury data show. ($1 = 0.7225 euros)

(Writing by Valentina Za; Editing by David Goodman)

By Manuela D'Alessandro

Stocks treated in this article : JPMorgan Chase & Co., Deutsche Bank AG, UBS AG