Chevron Corp. (NYSE:CVX) the giant oil company that has been locked for years in a legal battle with Ecuadorean villagers over claims of pollution won a major round on Tuesday, when a federal judge in Manhattan ruled that a $9.5 billion judgment against Chevron Corp. was unenforeceable due to fraud and corruption.

The judgment had resulted from 20 years of legal battles between Chevron and Ecuadoreans over environmental pollution in the Amazon.

The villagers alleged that Texaco Petroleum Co., a subsidiary of Chevron, spilled millions of gallons of toxic wastewater into waters of the Ecuadorean Amazon in the northeastern part of the country from 1964 to 1992 and left toxic sludge, ruining the culture and livelihoods of the farmers. Chevron bought Texaco in 2001.

U.S. District Judge Lewis A. Kaplan did not dispute that the pollution happened, but he supported Chevron’s complaint that the plaintiffs' attorney Steven Donziger and his team were involved in a conspiracy and criminal conduct. Kaplan acknowledged that Donziger and his colleagues had ghostwritten an environmental report used by the Ecuadorean court to decide Chevron’s judgment and even bribed the deciding judge.

Kaplan’s decision will not prohibit courts in Canada, Brazil and Argentina from enforcing the Ecuadorean judgment, where Chevron has also been sued by various indigenous Amazonian farmers, but the decision may cause other courts to look harder at the Ecuadorean judgment.