A theomachy is a battle among gods in Greek mythology.
An early example is the Titanomachy (War of the Titans), in which the Olympian Gods fought against the preceding generation, the Titans. The war lasted ten years and resulted in the victory of the Olympians and their dominion over the world. Another case is the Gigantomachy.
The gods were once again divided against one another, each supporting a different side during the Trojan War. In the Iliad, multiple theomachies occur. One is fought between Diomedes with the direct aid of Athena against Ares (part of Diomedes' aristeia in Book 5). Ares is wounded by the spear guided by Athena; this is the first theomachy to occur chronologically in the Iliad. Book 20 begins with Zeus' grant of permission to the gods to participate in the battle and is traditionally known under the title Theomachia. In Book 21 (478ff.) there is fighting between Hera and Artemis. This battle is shown by Homer to be almost playful as Hera is smiling while she boxes the ears of Artemis, which causes Artemis to fly away in tears. Also in Book 21, Poseidon challenges Apollo to fight. Apollo rejects his offer and comments on the triviality of gods fighting over the whims of mortals while their own pain from injury would be transitory and quickly healed. Theomachy is purposely added to show the unbridgeable gap between mortal men and the immortals who rule them. By showing the triviality of divine pain, human suffering is highlighted.