What is Mandate of Heaven?

In Chinese history, the mandate of heaven was the idea that a leader had the blessing of a higher power as long as he behaved properly and morally.