The Royal Palace, also known as Viceregio, is a historic building in Cagliari, the former residence of the King's representative during the Aragonese, Spanish and Savoy domination, and currently headquarters of the Prefecture and the Metropolitan City of Cagliari. It is located in Palazzo square, in the Castello district. The palace dates back to the 14th century and became the seat of the Viceroy since 1337, according to Peter IV of Aragon. Over the centuries the building underwent several modifications and extensions. Particularly significant were the eighteenth-century restorations; in 1730, by the Piedmontese engineers of Guibert and de Vincenti was built the staircase of honor leading to the noble floor, whose rooms were restored in 1735 from the valley. The west facade, with the main portal on the staircase, was set up by 1769, as evidenced by the inscription on the window door bezel that opens onto the central balcony. Between 1799 and 1815 the palace was the official residence of the royal family and the court, exiled from Turin, occupied by Napoleon. In 1885 the palace became the property of the Province, which established its seat of representation and cared for the restoration of internal environments, in order to adapt them to the new function. In 1893 the decorative works of the Council Hall were started, by the parish priest Domenico Bruschi for the frescoes and the angeletti for stucco. The work was completed in 1896.