The chapel and cloister were expanded during the 17th century. In 1684 the structure was reinforced and withstood the earthquake of 1691. The church itself was built by Diego de Porres and inaugurated in 1702. The 1717 earthquake damaged the structure severely. So did the earthquake of 1751. The site was partly destroyed during the 1773 earthquake and has been reconstructed in parts but areas of ruin still remain. The fountain of the main corridor was taken to La Merced's atrium in 1944. The colonial image of the Virgin located behind the main altar fell down during the 1976 earthquake.