Santa Sofia was almost destroyed by the earthquake of 1688, and rebuilt in Baroque forms by commission of the then cardinal Orsini of Benevento (later Pope Benedict XIII). The original forms were hidden, and were recovered only after the discussed restoration of 1951.