It's actually a reallllly bizarre case. What seems to have happened is:

First, Texaco and Gulf oil started to develop the Lagro Agrio fields in 1964. In 1972 they started production. In 1974, the Ecuadorian government obtained a 25% share of the venture; Gulf sold their share in 1976 to Ecuador, giving them a majority ownership, although Texaco did the actual drilling. In 1992, Texaco's concession ended, and the entire project was left in the hands of Ecuador and their state-owned oil company. They are continuing drilling to this day. This much seems to be established fact.

What's also uncontested is that starting in the 80s, Texaco did some cleanup. Texaco and their successors claim they did a great job, or at any rate, they did the legally mandated amount. Certainly the Ecuadorian government certified that Texaco had met its obligations in 1998. And certainly evidence has turned up showing a lot of damage and incomplete remediation since then. The environment down there is pretty fsked. There is significant debate over who exactly cleaned up what, but the broad outlines (Texaco did some cleanup, the government said it was good enough, and it's still pretty shitty) seems clear.

What's also fairly clear is that in 1993 (after Texaco stopped drilling, but before the cleanup was officially done), they got sued by local residents. The court cases dragged on for a long time, eventually yielding an enormous verdict in 2011. (US$9.5 billion.) How fair that verdict is remains disputed, but it clearly happened.

(Note, incidentally, that in 2001, so well after the cleanup was done, but well before the verdict was reached, Chevron bought Texaco, assuming their assets and liabilities. It doesn't seem disputed that Chevron is fully responsible for whatever Texaco did or did not do, but it does help explain why some stories and historical documents talk about Texaco, but new stories invariably reference Chevron.)

Now things get a bit weird. In a fascinating turn of events, it seems that the lawyers representing the local residents (specifically, Steven Donziger) have been engaging in fraud and bribery. Turns out they had a sympathetic documentary crew following them around, and apparently were bragging about doing illegal things in front of the crew, assuming they would keep it under wraps. Somehow Chevron found out about it, subpoenaed the film crew, got the raw footage, and got some US courts (and the Permanent Court of Arbitration in The Hague) to declare the entire Ecuadorian judgement to be a scam. And there's some pretty suspicious film evidence, plus Chevron got some witnesses to testify that the plaintiff attorneys bribed them. The story is wild; blackmailed judges, bribes, corruption, ghost written reports, just an absurd perversion of justice, and Donziger has been disbarred.

However, uh, obviously there's a lot of money at stake, and it's also been alleged that Chevron bribed the witnesses to say that the plaintiffs bribed them. Some think they evidence is not as one sided as it looks; it's been suggested that Donziger was railroaded. The whole thing is just a huge mess. As near as I can tell:

1. The Ecuadorean government did say that Texaco was off the hook, but they could have been mistaken (or pressured/bribed to say that). Whether this means they deserve a do over, I can't say.

2. Ecuador is responsible for a lot of the cleanup (joint venture, majority owned by Ecuador, remember?), and it seems clear that a lot of the cleanup, probably including at least some of Ecuador's, has not been done. And it does look like they may have seen a chance to stick Chevron with a bill for the cleanup they opted not to do, which does seem unfair.

3. Being sovereign means you get to do unfair things though. If Ecuadorean law says they can ignore the release and stick Chevron with a bill for the entire cleanup, I guess it says they can do that.

4. Being sovereign doesn't mean you can enforce those unfair things though. Texaco already packed up and left. Whatever is fair or legal, the time to get money out of them was THEN, when they had assets and people in the country. Now they're sending a bill to a company that moved out over 20 years ago. Other than generosity, they're not likely to see a penno of that money back unless they can convince another court to enforce it.

5. Annnnd they haven't managed that. Rightly or wrongly, courts outside of Ecuador have all decided Chevron was in the right. And given that Ecuador and Chevron both do something like $100b/year in revenue/GDP, they're both large, powerful players. Hard to feel enormously sympathetic to either, especially since both seem to be playing at least a bit dirty.

6. But of course, no matter what, this is still a tragedy. The two competing theories seem to be that A) Texaco skipped out on cleaning up their share of the mess, leaving the local people in the lurch B) Texaco cleaned up their share, but Ecuador skipped out on cleaning up their own share, leaving the local people in the lurch. Nobody seems to disagree that they got screwed over; it's just a fight about who is responsible. And even if their lawyer did commit fraud and bribery, that doesn't negate their right to not live in a toxic dump. If they end up losing their fight because of that, that just adds someone else who victimised them to the list.

Weird, weird story.

Sources: Eh, google it? Wikipedia has a good roundup, but a TON has been written about the case. There's just SO much. And most of it conflicting or disputed. I don't know of any one roundup that really covers it.