The castle takes its name from the nearby Capuan Gate (Porta Capuana). the castle was built as a fortress in the second half of the 12th century by the Norman King William I, known as William the Bad. The castle has been frequently altered and enlarged, first by Federico II of Swabia and later by the Angevin kings, although the later only occasionally used the castle, prefering Castel Nuovo as their domain. After the departure of the Angevins Castel Capuano passed to the Aragonese. Alterations over the centuries ended with its adoption for use as the Palace of Justice and prison, on the orders of the viceroy Don Pedro of Toledo in the 16th century. In 1858- 1861 it was radically restored by Reigler, keeping, however, its function as home of the Tribunal which it retains to this day. The Chapel of the Sommaria, a square building dating from the 16th century and decorated by the Spaniard Pedro Rubiales, is of particular interest.