In the aftermath of the Battle of Actium (31 BC), Marcus Agrippa built and dedicated the original Pantheon during his third consulship (27 BC). Augustus's Pantheon was destroyed along with other buildings in a huge fire in 80 AD. The current building dates from about 126 AD, during the reign of the Emperor Hadrian, as date-stamps on the bricks reveal. It was totally reconstructed with the text of the original inscription ("M·AGRIPPA·L·F·COS·TERTIVM·FECIT", standing for Latin: Marcus Agrippa, Lucii filius, consul tertium fecit translated to "'Marcus Agrippa, son of Lucius, Consul for the third time, built this") which was added to the new facade, a common practice in Hadrian's rebuilding projects all over Rome. Hadrian was a cosmopolitan emperor who travelled widely in the East and was a great admirer of Greek culture. He might have intended the Pantheon, a temple to all the gods, to be a kind of ecumenical or syncretist gesture to the subjects of the Roman Empire who did not worship the old gods of Rome, or who (as was increasingly the case) worshipped them under other names. How the building was actually used is not known.
In 609 the Byzantine emperor Phocas gave the building to Pope Boniface IV, who converted it into a Christian church and consecrated it to Santa Maria ad Martyres, now known as Santa Maria dei Martiri.