From Wikipedia’s “Canute the Great“:
[King Canute (994/995 – November 12, 1035)] is perhaps best remembered for the legend of how he commanded the waves to go back. According to the legend, he grew tired of flattery from his courtiers. When one such flatterer gushed that the king could even command the obedience of the sea, Canute proved him wrong by practical demonstration at Bosham, his point being that even a king’s powers have limits. Unfortunately, this legend is usually misunderstood to mean that he believed himself so powerful that the natural elements would obey him, and that his failure to command the tides only made him look foolish. It is quite possible that the legend is simply pro-Canute propaganda.