A court in Ecuador's Amazon told Chevron Corp on Monday to pay $8.6 billion in environmental damages, but the U.S. oil company vowed to fight on in a lawsuit seen as a global test case.

Chevron said it would appeal, meaning the case, which dates from drilling in the Andean nation during the 1970s and 1980s, could drag on.

The legal battle has spawned accusations of dirty tricks and bribery. Activists portray it as a fight for justice against rich polluters, but Chevron says it is driven more by opportunism and greedy trial lawyers. It has triggered related legal action in U.S. courts and international arbitration.

The court gave Chevron 15 days to apologize publicly for the contamination or face doubling of the damages figure.

We plan to appeal that and every other aspect of this illegitimate verdict and see to it that the perpetrators of this fraud are brought to justice, Chevron spokesman James Craig told Reuters.

The company, which says the judge in the case ignored evidence of fraud on the part of the plaintiffs, has no assets in Ecuador and believes it is unlikely ever to pay.

Chevron's shares traded 1.3 percent higher to close at $96.95 as investors shrugged off news of the court ruling. The stock had been lifted by gains in crude oil, and analysts said a final verdict in the court case was likely years away.

The plaintiffs, who originally demanded $27 billion in the lawsuit, were disappointed by the $8.6 billion figure and gathered to discuss whether they would push for more money.

Given the insignificance of the economic figure, we are going to analyze, discuss and decide if we will appeal this decision or not, Pablo Fajardo, a lawyer for the plaintiffs, said in an e-mailed statement.

The plaintiffs had said they would try to grab Chevron assets around the world once armed with a favorable judgment from the Lago Agrio court.

But their case is complicated by a ruling last week from international arbitrators ordering Ecuador to suspend enforcement of any judgment.

The saga is being monitored by the oil industry for precedents that could lead to other large claims against companies around the world that have been accused of contaminating the countries where they operate.

Judge Nicolas Zambrano issued the 187-page ruling from Sucumbios provincial court in the hardscrabble Amazon town of Lago Agrio. His courtroom is on the fourth story of a run-down building which houses a ground floor casino called The Mirage.

Chevron said the ruling was illegitimate and unenforceable in any court that observes the rule of law.

The California-based company had revenue of $198 billion and net profit of $19 billion in 2010.

LENGTHY APPEALS

The case highlights the risks of doing business in Ecuador, where leftist President Rafael Correa often feuds with the private sector and has publicly sided with the plaintiffs.

Residents of Ecuador's Amazon region have said faulty drilling practices by Texaco, which was bought by Chevron in 2001, caused damage to wide areas of jungle and harmed indigenous people in the 1970s and 1980s.

This ruling is an intermediate step. The appeals could go on for many years, said John van Schaik, oil analyst at Medley Global Advisors in New York.

But the fact that the Lago Agrio court ruled in favor of the plaintiffs sends a signal to oil companies that, more than ever, they need to be good corporate citizens, he added.

The ruling shows that times have changed, and companies need to take environmental concerns seriously.

Texaco first struck oil in Ecuador in 1967 and started pumping in 1972 as part of a consortium with the state. The company operated in Ecuador until 1990. Soon after, it turned its share of the consortium over to the Ecuadorean government.

State oil company Petroecuador has continued drilling in the area over the 20 years since Texaco pulled out.

If you look at the Exxon-Valdez case, that took 20 years to settle, said Allen Good, oil analyst at Morningstar in Chicago. I think there were expectations that the initial judgments would go against Chevron and I think the case is going to play out over a very long time.

Chevron says it cleaned up all the pits it was responsible for. But the dirt just under the surface around some former waste pools still has a black sheen and carries the eye-watering stench of oil.

Farmers say they cannot raise crops or livestock in these areas due to the contamination.

One oil analyst, Fadel Gheit of New York-based Oil & Gas Research Oppenheimer & Co, said he had spoken to Chevron Chairman and CEO John Watson recently about the case.

He was exceptionally combative and absolutely adamant. He said 'This is not going to happen on my watch. There is no way I am going to pay this kind of money,' Gheit told Reuters.

(Additional reporting by Santiago Silva in Quito, Alexandra Valencia and Hugh Bronstein in Bogota, Anna Driver in Houston, Daniel Wallis in Caracas, writing by Hugh Bronstein; Editing by Andrew Cawthorne, Kieran Murray and Matthew Lewis)