Years of protests have forced Indian officials to finally close a Coca-Cola bottling factory in the northern province of Uttar Pradesh for extracting groundwater above legal limits and polluting the environment with toxic effluents.

Coca-Cola’s Mehdiganj plant in Varanasi used to pump too much fresh water from the underground water table, a practice that has led to groundwater levels in the area dropping to critical levels. This infuriated local residents mostly employed in agriculture, who are suffering from scarce water resources.

The plant has also been accused of discharging effluents, containing excessive levels of pollutants, thus damaging the environment.

The battle to close the factory has been marked with a number of dramatic protests staged by local farmers. One protest, in 2006, lasted for over three months and culminated with a hunger strike among the local population and activists demanding the plant cease operation.

Finally, the bottling plant has been ordered to stop operation.

“The plant is closed following our orders,” Uttar Pradesh Pollution Control Board member secretary J.S. Yadav told AFP, specifying that Coca-Cola was ordered to replenish twice as much groundwater as it extracted and provide a permit from a government agency that regulates groundwater use, Yadav said.

Local campaigner Nandlal Master told the India Resource Center: “This is a great victory and a welcome confirmation that local communities can successfully take on big, powerful business.”

The world's largest soft drinks maker appealed the closure order to India's environment court, the National Green Tribunal, the Pollution Control Board said.

Last year, Atlanta-based Coca-Cola announced that the 15-year-old Varanasi bottling facility had been expanded and could produce 600 polyethylene terephthalate (PET) bottles of soft drinks per minute. With an estimated 26,500 kiloliters of beverage production per year, this used to be one of the smallest Coca-Cola factories in India.

Coca-Cola has 58 bottling factories in India, where consumption of soft drinks is swiftly growing with the expansion of the middle class. Many factories have been targeted by protests for the same reason: an excessive use of local water resources.

In early 2014, the authorities of the Uttar Pradesh province promised to demolish the Coca-Cola factory, claiming that the plant had been built on the land belonging to the local village council and therefore the construction was “illegal.”

Indian authorities have also imposed a nominal 126,000 rupee ($2,000) fine on the soft drink company over the land issue.

India’s Hindustan Coca-Cola Company Private Limited, which plans to invest $5 billion in India over the period 2012-20, has called the ruling “unprecedented” and denied allegations of destructive water usage as “misleading and false.”

“As part of the withdrawal of consent, we were not allowed or even asked to present any facts or explain our position,” the company said in a statement. “We recognize that water is critical to our business as integral to community needs and therefore we have a shared interest in the sustainability of water resources.”

Coca-Cola has encountered a similar problem in India before, at another bottling plant in Kerala, which was closed for a decade over the same accusation of depleting the local water table and dumping toxic effluent.

Though in the end a local court did rule in favor of the company, the facility has never been reopened.