LI HAIJUN considers himself lucky. His home was destroyed by a huge earthquake that hit the south-western province of Sichuan on May 12th 2008. But like most of his neighbours in the mountain village of Wolong, 16km (10 miles) from the epicentre, he was busy tending his crops. He and his family all survived and spent nearly a year living in a tent. The government paid much of the cost of building a new house close by. The 25,000 yuan ($3,925) he had to contribute was no small sum, but Mr Li, who is 46, says he has no complaints. The disaster is still a bitter memory, but life is back to normal.

The earthquake, centred on Wenchuan county, killed about 70,000 people and left some 18,000 missing—the deadliest in the post-Mao era. It was not only a human tragedy, it was also a severe political test for the ruling Communist Party. In the age of the internet, the government’s response could be monitored nationwide in real time. Contrast that with the secrecy the Maoist system was able to impose on the Tangshan earthquake of 1976, in which around a quarter of a million people died. Its epicentre was a mere 150km from Tiananmen Square, yet it was years before the government even acknowledged the death toll. The Wenchuan earthquake occurred in a very different China—one with a large new middle class that was anxious to help. For a party unused to co-operation with civil society, this posed a challenge.

Netizens quickly became aware that many of those killed were children, who were crushed in their schools. Parents and activists staged protests to vent their fury at officials for having allowed the construction of such “bean curd” buildings. The government responded by intimidating or detaining participants. (Radio Free Asia, a government-funded service in America, reported this month that campaigners in the town of Mianzhu had been put under surveillance or placed under house arrest in the lead-up to the tenth anniversary.)

But the government was more welcoming to those who merely tried to assist in the relief efforts. On their own initiative, NGOs and around 3m private citizens headed to Sichuan, where they distributed water, blankets and other supplies. It was, says Zhang Xuemei of the Sichuan Academy of Social Sciences, “an important turning-point” for civil society in China.

The government is less keen to hail it as such. It prefers to crow about the heroic response of the army and above all of the Communist Party. Officials can indeed claim considerable credit for getting the area back on its feet. Today in the city of Dujiangyan, on a site where hundreds of children died when their school, Xinjian Elementary, collapsed, there is a roast-duck restaurant and a panda-themed pedestrian shopping area. The rest of the block consists of elegant new buildings in grey brick adorned with decorative wood carvings.

In Yingxiu, another badly stricken but now rebuilt town near the epicentre, officials have turned another school into a memorial (pictured). One week before the tenth anniversary, soldiers were streaming up to lay flowers and bow in respect. It is no surprise that officials have chosen to highlight the story of this school, and to pave over the one in Dujiangyan. At the Yingxiu school, the death toll was far lower: 43 students and eight teachers killed.

But Ms Zhang, the social scientist, says the earthquake did result in a change of attitude by the government towards civilian involvement in disaster relief. “This event provided a model for how social forces could be put to use to respond to a big crisis,” she says. At the time, officials had no guidelines for working with civil society. The flood of volunteers caused congestion and compounded difficulties with feeding and sheltering everyone. But NGOs and the government soon established trust—a spirit often lacking in the party’s dealings with organisations that it does not control. When another big quake struck Sichuan in 2013, she says, the government was more prepared. “They said, ‘OK, we can put out the money and you can do the work.’”

The new model involves leaving the heavy work of rebuilding cities and roads to the government but creating space for civil society in areas such as the counselling of bereaved families. After the more recent earthquake, NGOs helped to resolve conflicts that erupted during the relocation of survivors of destroyed villages. In the past few days, a local group in Dujiangyan has been raising funds for quake victims with permanent disabilities. Ms Zhang says NGOs have been particularly helpful in the rebuilding of shattered societies.

In 2009, on the first anniversary of the Wenchuan earthquake, the government published a white paper promising to give “full scope” to participation by grassroots organisations and volunteers in such work. Its response to the earthquake in 2013 showed that it was not merely paying lip-service to the idea. A new Charity Law, which came into force in 2016, aims to make it easier for some domestic NGOs to register and raise funds. But in recent years Xi Jinping, China’s president, has been lashing out at those parts of civil society—independent lawyers, for example—that try to help the likes of the aggrieved parents in Sichuan. China’s government has shown it has the capacity to rebuild disaster zones quickly. But it remains suspicious of the motives of some of those whose help it badly needs.