King Arthur: The Lady of the Lake, her arm clad in the purest shimmering samite, held aloft Excalibur from the bosom of the water, signifying by divine providence that I, Arthur, was to carry Excalibur. That is why I am your king.
Dennis: Listen. Strange women lying in ponds, distributing swords, is no basis for a system of government. Supreme executive power derives from a mandate from the masses, not from some farcical aquatic ceremony! ("Monty Python and the Holy Grail", naturally).
Who was the first political thinker (ruler, or civil servant, or theorist or writer/philosopher) who proposed this rule about mandate from the governed masses? Any wording is acceptable as long as the spirit matches.
Just to be clear, the idea being referred to can be summarized as:
You can not stably rule a set of people who fully disagree with the idea of your ruling them. You can only rule them when they - for whatever reasons - acquiesce to, if not support - your rule.
NOTE: The question is specifically limited to the rule being framed as a rule. To be more precise, stated in the form of "every government should have a mandate of the masses", as opposed to "well, I think such a mandate is a swell idea for my specific city government, but I won't formally postulate that without such, no other government can work".