The Aeneid is a Latin epic poem, written by Virgil between 29 and 19 BC. After a century of civil strife in Rome and Italy, Virgil wrote the Aeneid to honour the emperor Augustus by praising his legendary ancestor Aeneas. As a patriotic epic imitating Homer, the Aeneid also set out to provide Rome with a literature equal to that of Greece.It tells the legendary story of Aeneas, a Trojan who travelled to Italy, where he became the ancestor of the Romans. It comprises 9,896 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 Aeneid is widely regarded as Virgil's masterpiece and one of the greatest works of Latin literature.