The Aeneid ( /əˈniːɪd/; Latin: Aeneis [ajˈneːis]—the title is Greek in form: genitive case Aeneidos) is a Latin epic poem, written by Virgil between 29 and 19 BC, that tells the legendary story of Aeneas, a Trojan who travelled to Italy, where he became the ancestor of the Romans. It is composed of roughly 10,000 lines in dactylic hexameter. The first six of the poem's twelve books tell the story of Aeneas's wanderings from Troy to Italy, and the poem's second half tells of the Trojans' ultimately victorious war upon the Latins, under whose name Aeneas and his Trojan followers are destined to be subsumed.
The hero Aeneas was already known to Greco-Roman legend and myth, having been a character in the Iliad, composed in the 8th century BC. Virgil took the disconnected tales of Aeneas' wanderings, his vague association with the foundation of Rome and a personage of no fixed characteristics other than a scrupulous piety, and fashioned this into a compelling founding myth or nationalist epic that at once tied Rome to the legends of Troy, explained the Punic wars, glorified traditional Roman virtues and legitimized the Julio-Claudian dynasty as descendants of the founders, heroes and gods of Rome and Troy.