In the eighteenth century, on the initiative of the canon Giulio Rusca, a small chapel with frescoes and the portrait of the Madonna was built in this room. Because of its success as a place of pilgrimage, an oratory with two altars was built in 1726, one dedicated to the Sacred Heart of Jesus and the Holy Virgin and the other to the martyr Nepomuceno. This complex is called the "Church of the Madonnetta" and since 1747 the Brotherhood of the Sacred Heart of Jesus, founded the year before, has been working there. In the early years of the twentieth century, Don Annibale Lafranchi decided to expand the building due to the demographic development of the faithful. The plans are slowed down and almost destroyed by the project of the new city plan, which provides for the demolition of the church. The saved church was expanded between 1922 and 1927 according to a project by the architects Enea Tallone (1876-1937) and Silvio Soldati (1876-1937) and became today's Sacred Heart Basilica. The title Basilica Minor was won by Pope Pius XII in 1952. awarded. The building was partially included in the "Cantonal list of historical and artistic monuments of the Canton of Ticino" in 1963.