SiemensGerman engineering conglomerate Siemens, rocked by the worst bribery scandal in the country’s history, won a court ruling on Friday reversing a $56 million fine against the Munich-based company.

Previously, a lower court ordered the company to pay back millions of dollars in profits after two former managers pleaded guilty to paying bribes to win orders from the Italian Enel Group. Now the highest tribunal in Germany, the Federal Court of Justice, instructed a lower court in Darmstadt to rehear the case against the former executives, who forwarded $8.9 million to staff of the Italian electricity company in 2000.

The court threw out the judgment against Siemens and lifted the bribery convictions, according to the court’s website. The court didn’t challenge that the payments were made. However, before 2002, bribery was only a crime if it harmed competition between German companies, the judges said. As no other German company bid for the order and Enel was not a government agency, the payments didn’t constitute corruption at the time, the judges said. Here’s a Reuters report on the ruling.

A success for Siemens? Perhaps. But in its ruling the court made clear that the main defendant won’t get off lightly, as the money was funneled through slush funds in order to win the gas turbine orders valued at more than 100 million euros. Hiding money in hidden accounts already constitutes improper use of funds, the court ruled, and stated that executives who use them can be convicted of a breach of trust.

Siemens faces investigations in the United States and at least a dozen other nations over claims its employees used bribes to win contracts. The company has found $1.9 billion of “unclear payments” made from 2000 to 2006.