NEW YORK (AP) — Ecuadorean plaintiffs cannot collect a $9 billion judgment in the U.S. against energy company Chevron for rainforest damage, a federal appeals court ruled Monday, upholding a judge's finding that the judgment was obtained through bribery, coercion and fraud.

The 2nd U.S. Circuit Court of Appeals in New York said U.S. District Judge Lewis A. Kaplan had the authority after a trial to rule in March 2014 as he did. It noted, however, that Kaplan's decision doesn't invalidate the Ecuadorean judgment and doesn't stop the enforcement of the judgment outside the U.S.

A U.S. spokeswoman for the Ecuadoreans, Karen Hinton, said they were shocked and called it a "sad day for the U.S. justice system."

"As disappointed as we are, this ruling will not deter the Ecuadoreans, their lawyers and their supporters from aggressively seeking justice in Canada and in other countries where litigation is underway to seize Chevron assets," she said.

A Chevron vice president and general counsel, R. Hewitt, Pate, said Chevron was "pleased that the truth has prevailed over fraud and corruption." He said the ruling "leaves no doubt that the Ecuadorean judgment against Chevron is the illegitimate and unenforceable product of misconduct."

In a decision written by Circuit Judge Amalya Kearse, a three-judge 2nd Circuit panel rejected the argument by the Ecuadorean plaintiffs that they were unaware of wrongdoing by lawyers in the case and shouldn't be held responsible.

"There is no authority suggesting that a party ignorant of its attorney's fraudulent actions may enforce a fraudulently procured judgment," the panel said. "Even innocent clients may not benefit from the fraud of their attorney."

An attorney for a New York City lawyer, Steven Donziger, who was heavily criticized by Kaplan, called the 2nd Circuit decision "unprecedented in American law" and vowed to explore all options on appeal.

"Never before has a U.S. court allowed someone who lost a case in another country to come to the U.S. to attack a foreign court's damages award," attorney Deepak Gupta said. "The decision hands well-heeled corporations a template for avoiding legal accountability anywhere in the world. And it throws the entire international judgment enforcement framework out the window."

The case resulted from a long-running court battle between Amazon rainforest residents and oil companies.

San Ramon, California-based Chevron Corp. had long argued that a 1998 agreement Texaco signed with Ecuador after a $40 million cleanup absolves it of liability. It says Ecuador's state-run oil company is responsible for much of the pollution in the oil patch that Texaco quit more than two decades ago. The Ecuadorean plaintiffs said the cleanup was a sham and didn't exempt third-party claims.

In February 2011, a judge in Ecuador issued an $18 billion judgment against Chevron in a lawsuit brought on behalf of 30,000 residents. The judgment was for environmental damage caused by Texaco during its operation of an oil consortium in the rainforest from 1972 to 1990. Chevron later bought Texaco.

Ecuador's highest court in 2014 upheld the verdict but reduced the judgment to about $9.5 billion.

When Kaplan ruled, he said it didn't matter that the villagers were pursuing a just cause.

"There is no 'Robin Hood' defense to illegal and wrongful conduct," he wrote. "And the defendants' 'this-is-the-way-it-is-done-in-Ecuador' excuses — actually a remarkable insult to the people of Ecuador — do not help them."