The original location is not the one it currently has. Initially it was a small church in Atxuri, which was built at the beginning of the 17th century in front of a hospital, to bury the sick who died (since in those times people were buried near the churches).
The Jesuits, thanks to a donation from Domingo de la Gorgolla, promoted its construction. In 1622, work on the church began according to plans drawn up by the Jesuit Father Ramírez and twenty years later the rear part was completed, divided into three sections, excluding the transept. After an interruption of three decades, the works resumed in 1672 with the undertaking of the transept and the head by the mountain stonemasons Manuel Ceballos and Mateo del Río. Three years later the bricklayer Francisco de Elorriaga began working on the roofs, vaults and dome.