Liu Fengguang, professor of Confucianism at Qufu Normal University, gives a lecture on Confucius' teachings in Yunhe prison in 2011. Photos Provide To China Daily

"If we incite people to do good by issuing decrees and meting out punishment, all we shall do is create those who fear the stick rather than those who revere doing right; but if we lead people on a just path with morality, we will breed a people imbued with an awareness of shame and they will submit themselves to governance."

Although those words were uttered by the Chinese sage Confucius about 2,500 years ago, they still have great resonance today, especially for the inmates of Yunhe prison in Shandong province.

In the past 24 years, more than 3,200 prisoners have "graduated" from the Yunhe Confucius Distance Learning College, which offers courses that expound on the sage's philosophy and are designed to rehabilitate offenders and prepare them for life outside prison. So far, about 1,000 of the graduates have found work in the low-end technology sector.

The college has distilled the basic concepts of the philosophy into 14 classes, one for each of the known works of Confucius, and it takes about two years to complete the entire course of study. The emphasis is placed firmly on restoring the inmates' sense of right and wrong.

The prison college, established in 1992, was the first of its kind in China. In addition to lectures by prison officers and online classes, Confucian scholars from across the country are invited to visit the prison once a month and teach classes for three days.

"If the prisoners sit around without doing anything, they are likely to get into fights. The idea of providing higher education was the result of a debate about how to make the best use of their time," said Liu Dengcai, the prison's deputy governor.

Although the Confucius teaching project has won plaudits from educationalists and penal experts, when the founders decided to turn their idea into reality, they had a hard time persuading institutions to provide teachers.

"The teachers feared the prisoners would be unwilling to learn anything they taught," said Liu Dengcai, deputy governor of Yunhe prison, Shandong province.

Having discussed the idea with a number of colleges and universities in Shandong, Liu and his colleagues eventually decided to work with Qufu Normal University, which provided intellectual support.

Working with university teachers, the prison officers adapted the sage's teachings to produce new textbooks that would make it easier for inmates to grasp the basic concepts of Confucianism.

Liu believes prison mangers need to understand the maxim: "Strict punishment and lenient treatment should be complementary to each other in order to maintain good governance."

For the prisoners, one overarching Confucian concept concerning the production of moral individuals is perfect for educational purposes. It requires people to display benevolence, righteousness and propriety, in addition to trustworthiness, loyalty and filial piety.

"I will never forget a lecture given by Bao Pengshan, a renowned scholar of Confucianism. He told us a great man should be one who is able to rectify his mistakes," said "Hao Xue" (his name has been changed to protect his privacy), an inmate who completed the course in Yunhe in 2010. "Bearing this line in mind, I want to reshape my personality and try to be a man of noble character."