Even before a judge in Ecuador hit Chevron Corporation with a $19 billion judgment for allegedly fouling the jungles of the country’s Lago Agrio region, the oil giant had claimed it is the victim of a hopelessly corrupt legal system. Now one of the trial judges in the case swears the historic judgment was bought and paid for by the plaintiffs.

Chevron’s lawyers at Gibson Dunn & Crutcher on Jan. 28 filed hundreds of pages with Southern District Judge Lewis Kaplan, who is overseeing Chevron’s racketeering case against plaintiffs lawyer Steven Donziger and others. Among the documents was an affidavit from Alberto Guerra, a former Ecuadorian judge who briefly presided over the Chevron case in Ecuador. In it, Guerra states that he and Nicolas Zambrano, the judge who ultimately handed down the record judgment against Chevron in 2011, offered their services to both Chevron and the plaintiffs. Guerra claims the plaintiffs lawyers bit at the offer, and agreed to pay $500,000 to Zambrano in exchange for being allowed to write the official court judgment against Chevron.

Indeed, the declaration continues, the decision was penned by the plaintiffs themselves, polished a bit by Guerra, and then passed off as the work of Zambrano. Guerra also states that he received untold thousands for ghostwriting various pretrial orders and decisions—mostly in favor of the plaintiffs—and that he was promised a cut of Zambrano’s take. The affidavit states that the plaintiffs agreed to pay Zambrano the alleged $500,000 bribe for his final judgment once they collected from Chevron.

"Mr. Zambrano and I agreed that I would write the court rulings in favor of the Plaintiffs," Guerra stated. "Sometimes I would write a court decision in favor of Chevron to avoid suspicion."

Guerra also said that, at a meeting with plaintiffs’ lawyers and representatives in late 2009 at a Quito restaurant called Honey & Honey, Donziger personally thanked him for his work "as a ghostwriter in this case and for helping steer the case in favor of the plaintiffs."

And in one ironic twist, Guerra said the plaintiffs lawyers offered him $5,000 plus travel expenses to come to New York and testify about the credibility of the Ecuadorian legal system against attacks from Chevron’s attorneys.

Karen Hinton, a representative for the Ecuadorian plaintiffs, accused Chevron of buying Guerra’s testimony and alleged in a statement that Chevron had relocated Guerra and his family and was lavishing benefits upon them. Hinton also accused Chevron of trying to buy judges in Ecuador in return for their testimony corroborating Chevron’s claims of institutional corruption in the country.

"Chevron has a long history in Ecuador of trying to undermine the environmental trial through improper pressure and illegal means, according to Ecuador’s courts," Hinton said.

John Keker of Keker & Van Nest, who represents Donziger and other plaintiffs lawyers in the Manhattan case, did not respond to a request for comment.

Guerra acknowledged in the filing that he has received $38,000 from Chevron for his work collecting supposed evidence of his and Zambrano’s conduct. According to Forbes, a Chevron spokesman said that Chevron also agreed to pay the former judge $12,000 in monthly living expenses and housing costs, as well as an additional sum for health insurance and legal fees.

"Mr. Guerra’s testimony supports what the evidence already proves—-that the plaintiffs’ lawyers wrote the judgment," Chevron spokesman Kent Robertson said in a statement to The Litigation Daily. "Mr. Guerra’s account describes how the process worked and the $500,000 bribe that ensured it would happen. There’s overwhelming corroborative evidence in the form of computer records, shipping records and bank records that validate each element of Guerra’s testimony."

Chevron counsel Randy Mastro of Gibson Dunn declined to comment.