The work was written in Italian in 1602, shortly after Campanella's imprisonment for heresy and sedition. A Latin version was written in 1613 - 1614 and published in Frankfurt in 1623.
The City of the Sun is presented as a dialogue between "a Grandmaster of the Knights Hospitaller and a Genoese Sea-Captain". Inspired by Plato's Republic and the description of Atlantis in Timaeus, it describes a theocratic society where goods, women and children are held in common. In the final part of the work, Campanella prophesies -- in the vealed language of astrology -- that the Spanish kings, in alliance with the Pope, are destined to be the instruments of a Divine Plan: the final victory of the True Faith and its diffusion in the whole world. While one could argue that Campanella was simply thinking of the conquest of the New World, it seems that this prophecy should be interpreted in the light of a work written shortly before The City of the Sun: The Monarchy in Spain, in which Campanella exposes his vision of a unified, peaceful world governed by a theocratic monarchy.