NAIROBI — On Thursday, 12 days after a large cargo ship got stuck on a reef off the coast of Mauritius, an island nation in the western Indian Ocean, its hull was punctured and hundreds of tons of its fuel began spilling into a pristine lagoon.

By Friday afternoon, local environmental groups estimated that at least a quarter of the ship’s nearly 4,000 tons of thick, black fuel oil had seeped into an ecologically crucial area of reefs, inlets and islands that are home to renowned conservation sites and endangered species.

“I am so angry,” said Sunil Dowarkasing, a former member of parliament who has devoted himself to environmental protection. “This area is special — it has a specific brain coral which can live over 100 years. It has a thriving mangrove forest, and endangered chameleons. Coral had just started regenerating after 15 years of our efforts.”

The Mauritius Environment Ministry released a statement Friday warning the public against approaching the site and saying it was urgently exploring options to prevent ­further spillage from the Panamanian-flagged MV Wakashio, which was being operated by a Japanese firm and was en route from China to Brazil. The small island nation relies heavily on tourism, and damage to its ecosystems could have long-term economic impact.

“We are in an environmental crisis situation,” the environment minister, Kavy Ramano, said in a separate statement. The government has appealed to the United Nations for assistance.

Dowarkasing, who spoke by phone on a beach from where he could see the ship, said dozens of volunteers were making a floating cordon of sugar-cane straw to prevent more oil from reaching the fragile reef and shore. “I blame the government for not doing anything for 12 days, and sitting idle,” he said. “They neglected the possibility of a massive oil spill.”

The government is now racing against time, as the ship comes nearer to breaking apart, which would expand the spill and make debris harder to clear. Dowarka­sing said it appeared the government had sent coast guard boats to attempt pumping fuel out of the ship, but the ministry’s statement did not mention those efforts.

The grounding of the ship happened off the main island’s southeastern shore, near an area called Pointe d’Esny, a renowned brackish wetland that contains plant and insect species found only in Mauritius. Blue Bay Marine Park, the country’s most famous snorkeling spot, is just one mile away.

“Thousands of species around the pristine lagoons of Blue Bay, Pointe d’Esny and Mahebourg are at risk of drowning in a sea of pollution, with dire consequences for Mauritius’s economy, food security and health,” said Happy Khambule, Greenpeace Africa Climate and Energy campaign manager. “Once again we see the risks in oil: aggravating the climate crisis, as well as devastating oceans and biodiversity and threatening local livelihoods around some of Africa’s most precious lagoons.”