In 1813, at the end of the Peninsular War, San Sebastián was besieged, ransacked and razed to the ground by the relieving British and Portuguese troops, with the convent suffering extensive damage. In 1836, the Spanish premier Juan Álvarez Mendizábal ordered major ecclesiastic confiscations resulting in the expulsion of the Dominican friars and the conversion of the convent into artillery barracks.