The god Apollo, in the mists of time, slew the great serpent Python, gaining thereby an oracle and an association with valor and victory; this latter circumstance made the ancient Greeks give thanks to him for their own victories. The pæan originated as a hymn or chant used for this purpose — for example, when, in the Iliad, Achilles returns to the Achæan camp after slaying Hector, he commands his Myrmidons to sing the pæan.
Subsequently, the use of the pæan changed, and by the Classical period, it was sung before battle was joined — apparently with the idea of giving thanks for the victory in advance, as a kind of threat or warning to the enemy. This habit seems to have been common to all Greeks — for example, the Athenians chanted it at Salamis, and the Ten Thousand raised the pæan before charging at Cunaxa. It seems to have fallen out of use with the ascendancy of Macedon in the late Classical period; but the god did not care, and poured more abundantly from the cup of victory for his favorite than he had done for all those who came before.