The idea to build a church in this place goes back to 1866 when the founders of the Spiritual Society of St. Joseph started a campaign to build a temple dedicated to the Holy Family. After 15 years, thanks to donations, an amount was raised to purchase a plot of land. The cornerstone was laid on St. Joseph's Day, March 19, 1882. The church project was commissioned to the architect Francisco de Paula del Villar, who, however, could not come to an agreement with the association and resigned after a year. His place was taken by Antonio Gaudi.