King of Kings is a title that has been used by several monarchies and empires throughout history. The title originates in the Ancient Near East. It is sometimes used as the equivalent of the later title Emperor.
The first king known to use the title "king of kings" (šar šarrāni) was Tukulti-Ninurta I of Assyria (13th century BC). The title used to be intended quite literally, as a šar or mlk was the title of a king of a city-state, and with the formation an empire in the Late Bronze Age, the Assyrian rulers installed themselves as rulers over the existing structure of rulers (kings) of city-states.
The Persian title of a king of kings is shahanshah /ˈʃɑːənˈʃɑː/, associated especially with Zoroastrian Persian Achaemenid Empire, where it referred to the monarch ruling over other monarchs who had a vassal, tributary or protectorate position.
The title is mentioned in the Hebrew Bible, as מלך מלכיא, applied to Nebuchadnezzar and to Artaxerxes. In Daniel 2:37, Daniel interprets the dream of Nebuchadnezzar to the effect that