A US court has dealt oil giant Chevron a severe blow after lifting a ban on an $18bn judgment against the firm for contaminating the Amazon.

A New York appeals court has reversed an earlier order freezing enforcement of the record damages award. It is the latest reversal in a nearly two decade-long legal battle over pollution in the Amazon rainforest in Ecuador.

In February, a judge in Ecuador ordered Chevron to pay damages to the plaintiffs, but both Chevron and the residents appealed, and the case has yet to make its way to Ecuador's highest court.

In anticipation of the judgment, however, Chevron had filed court papers asking district judge Lewis Kaplan to freeze any possible enforcement of payment anywhere outside Ecuador. Kaplan, who presides over a chunk of the litigation in Manhattan federal court, issued the now-reversed preliminary injunction in March.

Karen Hinton, spokeswoman for the plaintiffs, said the appeals court order meant it had recognised that Kaplan had acted too fast in issuing an injunction. "Chevron abused the law, and Judge Kaplan rushed to judgment without considering the overwhelming evidence against the oil giant," she said in a statement.

"We can now at least dream there will be justice and compensation for the damage, the environmental crime, committed by Chevron in Ecuador," lead lawyer for the plaintiffs, Pablo Fajardo, told the Associated Press.

In a statement, the company said: "Chevron remains confident that once the full facts are examined, the fraudulent judgment will be found unenforceable and those who procured it will be required to answer for their misconduct."

The Ecuadorian rainforest residents say oil giant Texaco, which was bought by Chevron in 2001, is responsible for hazardous waste dumped on indigenous land in the 1970s and 80s.

Chevron says Texaco cleaned up all waste pits for which it was responsible before turning the sites over to state-owned oil company Petroecuador, which still operates in the area.

An international arbitration tribunal also last month found that Ecuador must pay $96m to Chevron because Ecuador's courts had violated international law through their delays in resolving commercial disputes involving Texaco.

Appeals court judges Gerald Lynch, Rosemary Pooler and Richard Wesley also granted the plaintiffs' request to stop a November bench trial before Judge Kaplan, who was to determine whether to extend his injunction.

Chevron has accused the Ecuadorians and their longtime legal adviser, Steven Donziger, of illegally pressuring the Ecuadorian legal system to render a judgment in their favour.

The oil company has pilloried Donziger for his comments on corruption in Ecuador's judicial system, and his purported efforts to intimidate officials. The remarks came to light in an acclaimed documentary, Crude, and its outtakes, which were subpoenaed in US litigation.

The appeals court order came after the judges heard oral arguments on Friday. The judges said they would issue a full opinion at a later date.