A library in China has burned a number of books and other items in a drive to purge materials that deviate from Communist Party doctrine, according to reports.

Workers at the county library in Zhenyuan, Gansu province, torched 65 “illegal publications and religious publications, especially books, pictorial publications and visual content that showed leanings”, the South China Morning Post reported, quoting a post by the library on a Chinese website.

Among the works were items donated by the public, several news reports said.

Chinese social media users likened the chilling act to the incineration of books ordered by an ancient Qin dynasty emperor. “All of a sudden Chinese history has gone back 2,000 years,” said one.

Another asked: “Is this a new Cultural Revolution?” referring to the 20th-century Maoist purge of non-Communist thought.

The book-burning also had echoes of the Nazi-era bonfires of unwelcome literature by right-wing students.

The Zhenyuan library acted shortly after a diktat released by the Chinese education ministry ordered schools to undertake a “special review and clean-up” of illegal, “unsuitable”, out-of-date and damaged books.

Some books with preservation value should be stored separately, according to the memo accessed by The Independent.

The purpose of the purge was to “create a healthy and safe environment for educating people” and allow people to “deeply study” so-called Xi Jinping Thought.