In a big victory for Chevron, a federal judge ruled Tuesday that a two-decade legal effort to punish the company for polluting the Ecuadorean rain forest was marred by fraud and corruption of the Ecuadorean judicial system.

The decision in a U.S. District Court in Manhattan was expected, but it was not immediately clear how it might influence courts in Canada, Brazil and Argentina, where lawyers representing indigenous Amazonian farmers have sued Chevron to seize assets. It is also doubtful that the Ecuadorean courts will reverse a $9.5 billion judgment against the U.S. company.

Central in the decision was Judge Lewis Kaplan's view of Steven Donziger, a Manhattan lawyer who has led the legal effort but who was accused by Chevron of ghostwriting a crucial report submitted to the Ecuadorean court to decide the case and even participating in the bribing of the deciding judge. Chevron sued Donziger and several associates, accusing them of masterminding a conspiracy to extort from and defraud the corporation.

Kaplan accepted Chevron's arguments, ruling that "an innocent defendant is no more entitled to submit false evidence, to co-opt and pay off a court-appointed expert or to coerce or bribe a judge or jury than a guilty one."

The decision does not dispute that pollution occurred, nor does it bar enforcement of the Ecuadorean judgment, but it does bar Donziger and two other representatives "from profiting from the egregious fraud that occurred."

Donziger and the Ecuadorean farmers he represents insist that Texaco, before it was bought by Chevron, spilled millions of gallons of toxic wastewater into waters of the Ecuadorean Amazon in the 1970s and 1980s and left unlined waste pits filled with toxic sludge, ruining the lives and culture of several indigenous groups. Chevron says that Texaco cleaned up its mess, and that most of the pollution in the Ecuadorean jungle was caused by the Ecuadorean national oil company.

Chevron was originally ordered to pay $19 billion to the Amazonian farmers by an Ecuadorean court in 2011. But last year the Ecuadorean National Court of Justice, Ecuador's highest court, reduced the fine to $9.5 billion, although it upheld the original decision despite Chevron's cries of fraud. The Ecuadorean government has strongly supported the case against Chevron.

Donziger has been consistently supported by influential environmental activists, including Michael Brune, the executive director of the Sierra Club.

Donziger said in a statement that he would appeal.

In his testimony to the court, Donziger conceded that he had made mistakes, but he denied involvement in any bribery, witness tampering or fraud. A former reporter, Donziger is a Harvard Law School graduate with a knack for public relations. He gained prominence in the film "Crude," which portrayed him in a favorable light crusading for the Ecuadorean downtrodden.