A Mexican court has issued an injunction blocking further work on a real estate project in the Caribbean coast resort of Cancun that threatens a mangrove swamp at the site.

Heavy machinery largely cleared the mangrove trees from the area in January over the objections of local environmentalists.

But environmentalist Araceli Dominguez expressed hope Wednesday that the mangrove could be recovered, after the court ruled that the project violated the public interest in preserving the wetland known as Nichupte lagoon.

A coalition of Mexican environmental groups praised the court ruling, while acknowledging that the government development and real estate firm that sponsored the project could appeal.

Mangroves provide a key habitat for marine life, help clean water and provide a buffer against erosion and coastal storms.