HONG KONG — China said Tuesday that it would prohibit official banquets from serving shark fin soup, an expensive and popular delicacy blamed for a sharp decline in global shark populations.

The ban, reported by Xinhua, the state-run news agency, could take as many as three years to take effect, and it remains unclear how widely it will be adhered to across a sprawling nation where orders issued by Beijing are often shrugged off by officials in faraway regions and provinces.

Still, the decision to stop serving shark fin soup at official functions was welcomed by environmental campaigners. Experts have long cautioned that soaring demand for the soup over the past two decades has imperiled shark populations around the globe.