Law of the Jungle. By Paul Barrett. Crown; 290 pages; $26. Buy from Amazon.com

Crude Awakening: Chevron in Ecuador. By Michael Goldhaber. Rosetta Books; 84 pages; $2.99 (only available as an e-book) Buy from Amazon.com

WHEN a judge writes that an “extraordinary” case “include[s] things that normally come only out of Hollywood”, you can be sure that a book will soon follow. In March Lewis Kaplan, a judge in New York, ruled that a $19 billion award for damages levied by an Ecuadorean court against Chevron, an oil company, was based on fraud. Sure enough, two new works have just come out to clarify a case of unparalleled notoriety and cost.

“Law of the Jungle”, by Paul Barrett, a business journalist, offers a good starting point. His tale goes back to the Wild West atmosphere of Ecuador in 1970, when the military government invited Texaco, an American energy firm, to drill in the Amazon region. The gringos dumped oil-exposed water into streams and pockmarked the land with petroleum-laden pits. For years the government looked the other way while pocketing over 90% of the revenues. However, once it asked Texaco to seal the pits, the firm refused to spend the piddling $4m a clean-up would have cost.

In 1992 Texaco handed its fields to Petroecuador, the state oil company. A year later Steven Donziger, an American lawyer, filed a class-action suit in New York on behalf of indigenous Ecuadoreans he claimed had been poisoned by Texaco’s waste. Following a decade of legal wrangling and the purchase of Texaco by Chevron, the case moved to Ecuador’s courts.

On the surface, the trial’s outcome looked like a triumph for the voiceless victims of greedy foreign capitalists. Chevron argued that Ecuador had released it from its liability after it completed some later clean-up work requested by the government, that the levels of oil-related chemicals in the soil and water were safe and that there was no evidence that Texaco’s byproducts caused any illnesses. But in 2011 the Ecuadorean judge shrugged off these points and handed down a massive judgment. The case made a star of Mr Donziger, who was featured in “Crude”, a fawning 2009 documentary. If the award were enforced, it would also make him rich.

Here “Crude Awakening”, an e-book by Michael Goldhaber of the American Lawyer, takes over. He embeds his readers with Chevron’s sleuths as they research the plaintiffs’ case. Using copied hard drives, turncoat witnesses, bank records and scenes cut from “Crude”, the company demonstrates to Mr Kaplan’s satisfaction that the legal team led by Mr Donziger had coerced the Ecuadorean judges into letting them ghostwrite both an “independent” expert report and much of the final ruling. Mr Kaplan issued an order banning the lawyer and his clients from collecting any proceeds from the case. So far, no court has tried to seize any Chevron assets.

Mr Goldhaber recalls that his “naive hope was that the Ecuador case would for the first time establish non-US courts as a viable alternative to hold companies accountable”, but reached the “reluctant” conclusion that Mr Donziger had behaved even worse than Chevron. Yet his gleeful narrative style makes clear where his sympathies lie. “Ding, ding, ding,” he writes, using the game-show tune for a right answer, as Chevron lawyers match phrases in the ruling to files on Mr Donziger’s computer.

In contrast, Mr Barrett makes for an impressively even-handed judge as he appraises his saga’s “knaves and villains”. He calls Texaco to account for dirty drilling, and holds Petroecuador, which maintained such practices for years, to the same standard. He too thinks Mr Donziger made a “deal with the Devil”, noting that the attorney even opposed the Ecuadorean government’s own environmental clean-up plan in order to preserve his lawsuit.

However, Mr Barrett paints his protagonist as a well-meaning tragic hero undone by hubris rather than a venal con man. (Mr Goldhaber recognises “the purity of [Mr Donziger’s] motives” only as an afterthought.) And unlike Mr Goldhaber’s view that Mr Kaplan “honoured his profession by striving toward the goal of objectivity”, Mr Barrett writes that the former corporate lawyer had “a one-sided perspective for a supposedly disinterested judge”—in Chevron’s favour. He is particularly incensed at the judge’s ruling that the makers of “Crude” were not entitled to press freedom, which allowed Chevron to see out-takes from the film.

Despite these differences, the authors share a conclusion. After 20 years in court, Mr Donziger, who called the Kaplan ruling “deeply flawed” and plans to appeal, has squandered millions of his backers’ money and has seen his reputation destroyed. Chevron’s legal bills are estimated at $500m—an amount that could probably have funded a clean-up with cash to spare. The people of eastern Ecuador, however, are still no better off.