The 5.8 magnitude aftershock was epicentred 40 km (25 miles) west-northwest of Guangyuan, the U.S. Geological Survey said.