Thamos, King of Egypt (or King Thamos; in German, Thamos, König in Ägypten) is a play by Tobias Philipp, baron von Gebler, for which, between 1773 and 1780, Wolfgang Amadeus Mozart wrote incidental music, K. 345/336a, of an operatic character.
It is not known for certain whether the music that Mozart composed was performed with the play during his lifetime. The play's première took place at the Kärntnertortheater in Vienna, probably on 4 April 1774, by which time two choruses had been written. Performances in Salzburg in 1776 and 1779-80 may have incorporated the orchestral interludes and the three choruses in their final form, respectively. The music was re-used in 1783 in a different play (set in India, not Egypt), Lanassa, by Karl Martin Plümicke.
Thamos has succeeded his father, Ramesses, as king of Egypt, but Ramesses had usurped the throne from the rightful king, Menes, who is now disguised as the high priest, Sethos. Thamos loves Sais, a priestess, but she is really Menes' daughter Tharsis, for whom the high priestess Mirza is plotting marriage to Pheron, a treacherous general. When Menes reveals his true identity, Pheron is struck by lightning and Mirza kills herself. Menes cedes his crown to Thamos and Tharsis as all ends happily.