It is great news for elephants that China has declared a halt to commercial ivory trade by the end of 2017. China’s huge appetite for ivory — the combination of an ancient tradition of ivory carving and a swelling middle class ready to pay for it — was by far the driving force behind soaring demand for elephant tusks and, tragically, a dangerous escalation in the slaughter of African elephants. But before the celebrations begin, several cautionary notes are in order.

First, China’s decision was not entirely altruistic. As Javier Hernández, a Times reporter, wrote from Beijing, there were also political benefits for President Xi Jinping. The ban strengthens his campaign against corruption, in which ivory is a currency; it improves his standing in Africa, where China has major interests; and it enhances his image as an environmentally responsible leader. There’s nothing wrong with any of that; on the contrary, it demonstrates that China’s leadership recognizes the responsibilities that come with China’s global power and influence.

The more important question is how strictly China will enforce the ban. In principle, the closing of the Chinese market, which has accounted for 50 to 70 percent of illegal ivory, will go a long way toward extinguishing the traffic in ivory. But Beijing has often been lax in following up on worthy decisions, and any illicit trade as lucrative as ivory could easily sneak through any cracks. Another danger is that, once China vacates the market, Asian countries such as Vietnam, Myanmar or the Philippines could try to move in.

Trafficking in elephant tusks has survived decades of bans and campaigns. Global ivory trade was banned in 1989 under the Convention on International Trade in Endangered Species of Wild Fauna and Flora (Cites), and African nations have made considerable efforts to combat poaching. But the ban had many loopholes, and so long as there was a market where ivory was fetching $2,100 per kilogram ($952 per pound), the poachers and smugglers had ample incentive and resources to bribe officials and kill rangers.