The fort is a circle surrounded by a square; each corner of the square is protected by an individually designed barbican, or outwork, while the central circle is a lofty cylinder containing halls, chapels, apartments, courtyard, and prison cells. In 590 Pope Gregory the Great, conducting a penitential procession to pray for the end of a plague, had a vision of the archangel Michael sheathing his sword over the castle, signifying the end of the plague; from that incident came the structure’s modern name and the marble statue of the archangel that surmounts the building. Throughout the Middle Ages the castle served as a refuge in times of trouble, especially for the popes, who could reach it from the Lateran through a protected passage. Clement VII took refuge there from the troops of the Holy Roman emperor Charles V during the sack of Rome in 1527. he popes used part of the castle as a prison, and eventually the building became a military barracks and prison. The military use ended in 1901, when the castle’s restoration was begun.