Three thousand years ago, the Duke of Zhou set China a glowing example. A paragon of virtue, he spelled out a philosophy of a ruler in harmony with heaven that inspired Confucius, and came to fill the ideological vacuum left behind by Chairman Mao.

"He who exercises government by means of his virtue may be compared to the north polar star which keeps its place and all the stars turn towards it," wrote Confucius 2,500 years ago.

As he wrote these words, he will have had in his mind's eye the Duke of Zhou, probably the first real person to step over the threshold of myth into Chinese history.

"Confucius, in his own words, said: 'Oh, in politics I follow the Duke of Zhou'," says archaeologist Wang Tao.

"I'm sure he very much tried to restore the so-called golden age, or golden rule of Zhou dynasty, particularly in the rule under the Duke of Zhou."

Mostly in Chinese history, everyone seems to be behaving badly

In the 5th Century BC, Europe had Socrates and China had just had Confucius. Both philosophers thought hard about ethics, and the right relationship between the individual and the state.

We often think of Confucius as being the foundation stone of Chinese political philosophy, and so do most Chinese. But he was channelling a world view which had been crystallising over centuries.

"Everybody including Confucius himself always said: 'The Duke of Zhou is my hero, he really set up the foundation, particularly the cultural foundation of China,'" says Tao.

We don't actually know much about the Duke of Zhou.

He's more a personality cult than a person. But the seed of the cult lies in a real historical figure and real events. The duke helped his brother sweep away a corrupt ruler and found the Zhou dynasty in the 11th Century BC.

Already north China had cities, public works and coinage. There was no empire as yet, but even ruling a kingdom required skill and subtlety.

As History is My Witness Former BBC Beijing correspondent Carrie Gracie presents a 10-part series on figures from Chinese history who reveal something about China today

Programmes can be heard every weekday on BBC Radio 4 at 13:45 BST

Alternatively, listen again on the BBC iPlayer China: As History Is My Witness Download the podcast

After his brother died, the Duke of Zhou acted as a dutiful regent, and when his nephew came of age, he handed over power.

"He has become as it were everybody's favourite uncle. Because in his noble manner of handing power over - rightfully - to his nephew, he has become a paragon of goodness throughout China's history," says Frances Wood, curator of the British Library's Chinese collection.

Mostly in Chinese history everyone seems to be behaving badly. Regent uncles, dowager empresses, concubines, brothers… all end up doing the wrong thing. Skim read the dynastic ups and downs of imperial China and it is a terrifying bloodbath of unexplained deaths, heads severed, babies strangled, siblings thrown down wells, kings poisoned, whole families executed or challengers torn limb from limb. But not the Duke of Zhou.

That is what makes him such a big favourite with Confucians. At the heart of their political philosophy, and far more important than rules or contracts, is sincerity.

Image caption Showing respect to ancestors is extremely important in Chinese society

"To the Chinese way of thinking, that's a very decent thing to do, to hold on to your promise," says historian Xun Zhou of Hong Kong University.

"It's a mandate of heaven that his nephew became the king, and he did that."

The mandate of heaven is the Duke of Zhou's big idea. The ruler governs by virtuous example, which spreads virtue throughout the land, and in turn demonstrates his harmony with the divine.

But there's a get-out clause for rebels. If the king fails to rule virtuously, harmony is ruined and can only be restored by removal of the king.

"One of the great things about Chinese history is the way that people become godlike - that gods and people are slightly interchangeable, and people become slightly superhuman. I think the Duke of Zhou is superhumanly good," says Frances Wood.

The concept of the mandate of heaven contains within it the idea that if a ruler is good, heaven will be pleased and all will go well, Wood says. If a ruler is bad, heaven will show its displeasure through earthquakes and all sorts of natural disasters, and the ruler will be overthrown.

The Duke of Zhou is also credited with the creation of imperial rituals - a process reinforced by Confucius, who helped make China a nation of ritual. These rituals, many of which persist today, often express someone's position in society, or within the family.

"Confucianism is particularly strong on [ideas such as] that a son must obey his father, a wife must obey her husband," says Wood.

The Duke of Zhou Born in 11th Century BC

Personal name Ji Dan

The Zhou dynasty ruled what is now part of Shaanxi province - known as the cradle of Chinese civilisation

The Duke is also known as the "God of Dreams" - in legend, he lets people know via dreams when something important is going to happen to them

He founded what is now the modern city of Luoyang in western Henan province, in c1036 BC

"The ritual within the family, the pecking order, all of those things are established by ritual."

Trumping all the other Confucian duties is the duty of the living to the dead. The ancestor is at the very top of the family hierarchy.

"Ancestral worship in China is so important, because the Chinese don't have any particular religion, they don't believe in God," Wang Tao explains.

"But they all worship ancestors. If you want to establish yourself in a society, you have to have a good ancestor. And you also have to have a good relationship to that ancestor."

The Duke of Zhou is the good ancestor par excellence. And he looked back himself even further, to China's legendary ancestors, Tao says, "using that to form the nation or the culture of China".

But in 1949, a revolution occurred. A political culture built around venerating ancestors and learning lessons from their perfect rule was turned on its head.

"Political power comes out of the barrel of a gun," said Mao. You could try teaching those who disagreed with you, but if that failed you should destroy them.

For a century, China had been haemorrhaging territory to Western and Japanese colonialists. For the first time in history, a self-consciously mighty civilisation felt poor and backward.

Image caption In the 1970s, the Chinese were urged to turn their backs on the teaching of Confucius

To many Chinese, their ancient philosophy seemed like part of the problem. And when the communists took power in 1949, Confucius and the Duke of Zhou were thrown off their pedestals.

"The Chinese past was the enemy! It was held responsible," says Peter Bol of Harvard University.

"If China had once been the great power in the world, if it had once been the source of models for the rest of east Asia, the Chinese past was used to explain why it no longer was, and it had to be destroyed."

Mao's Cultural Revolution set out to destroy the Four Olds - Old Customs, Old Culture, Old Habits, and Old Ideas.

In 1966, 11 million Red Guards, Mao's young shock troops, flooded Beijing and destroyed thousands of relics and temples - all of China's history that they could find.

But when Chairman Mao died 10 years later, the Cultural Revolution and the assault on history died with him. It was time for China to go back to the beginning.

"After the Cultural Revolution, the Chinese government, people, desperately want a new ideology, because Mao's philosophy or thought has caused so much damage to the country, to the people. So Confucianism came in conveniently, to fill the gap," says Wang Tao.

Image caption Confucius has returned to favour in present-day China

"And the Duke of Zhou has also regained his popularity, and a lot of people now talk about the Duke of Zhou, the ancestral worship, or the old order cosmos mandate of heaven, in much more favourable way now. And I think it does reflect the change of the society."

Confucius reborn as self-help The reason why these simple truths have survived down the millennia is that they have helped generation after generation of Chinese to understand the nature and the culture that formed them, and not to lose their heads, even when confronted by immense social change and almost overwhelming choice. From the recent bestseller, Confucius from the Heart by Yu Dan Find out more

So the Duke of Zhou and Confucius are back on their pedestals. Politically fashionable again.

Barely a month goes by without the Chinese government opening a Confucius Institute somewhere in the world, to teach language and culture and project soft power. Already there are nearly 1,000 of them in more than 100 countries.

The new generation of leaders taking over next month wants to honour all their ancestors, communist and Confucian.

So just a stone's throw from party headquarters, the statue of the ancient philosopher gazes out serenely. And somewhere in the spirit world, the Duke of Zhou must be smiling.