Origin In the 9th century, the nuns who abandoned the
Convent of Sismeiro, destroyed in 982 by Almansor, transported with them a small image of ('Our Lady of the Rock', roughly translated), which they hid in Quintela. It was only in 1498, that the first cult to was started, after the image was discovered in the rocks of the village, by a mute child named Joana. The construction of an altar, was done through the initiative of the abbey of São Paio, in the parish of Vila da Rua, who became the first guardian, collecting alms from the parishioners for the construction of a temple. The faithful began to visit, in pilgrimage, the place with the image was found during the first years of the 16th century.
Kingdom By the first half of the 16th century, owing to a dispute between the bishop of Lamego and the king over the region of Senancelhe, the patron of the sanctuary and parish of Rua became independent. The abbey began to select his successor and renounced his role in the presence of
Pope Julius III. His successor, Fernão Pires, nominated Father Bartolomeu Madureira, who was unpopular with the local community. Between 1555 and 1559, there was a demand from Rome that the Portuguese Crown should promote the rights of the Vatican in Senancelhe. Consequently, King
Sebastian donates Rua and church annexes to the
Society of Jesus, from the College of Coimbra. It was likely that at about the same time the paintings in the sacristy were painted at about the same time. In 1639 there was a reference to two silver-plate lamps on the site. On 13 July 1654, the municipal council donated to the Jesuits the uncultivated lands around the church to construct their college, which were immediately encircled by small wall until the presbytery. During the 1670s, the Jesuits began accumulating more benefits and gifts: in 1671, Manuel Rodrigues Ramos and his wife (of Arneirós) gifted a golden chair; in September 1676, the bishop João de Melo, gave the Jesuits a silver-plated crown, encircled with 20 precious stones; in 1677, King
Pedro II also donated a silver crown studded in diamonds; the clergy of the realm also donated, in 1678, a simple silver crown; on 3 September 1679, there was a donation of red canopy, flaked with silver, by the descendants of Soutelo; in August 1682, Isabel Proença, of
Penamacor, donated an amber pear covered in flakes of gold and painted in green and white, to the Baby Jesus; another member of the congregation donated 17 reliquaries to the sanctuary; and, on 22 September, António Fernandes Matos sent from Pernambuco (in Brazil) 50$000
réis. Father
António Cordeiro, around 1682, petitioned the provincial branch of the Society, to allow the construction of a residence, and in 1682, a formal plan was sent to Rome for approval. On 9 September 1684, the general council authorized the construction of a building for three to four residents, with eight to ten cubicles, to shelter priests that passed through Bragança, in addition to two spaces for the bishop's living quarters, when he annually visited the sanctuary. The cornerstone was laid on 28 July 1685 for the residence, alongside the sanctuary, in order to support the Jesuits whom assisted the Easter celebrations (which was connected to the Church by a catwalk). In 1703, Father Cordeiro returned to Lapa, in order to assist the construction of the residence and new sacristy. By 1714, the college was completed, and classes in Latin and Morals were begun, under Chaplin João Marques Luseiro. The gifts continued to pour into the church: at the end of the 17th century, King
Pedro II, offered a silver crown in the name of the
House of Braganza; during the 18th century, King
John V donated religious equipment to the chapel; Father Manuel Rodrigues, who died in Castro Daire, left behind 6$000 réis in the 18th century; between 1720 and 1730, votive paintings were completed in the altar of the sacristy; and, in October 1752, António da Fonseca Osório donate eight pieces of coin, equal to 1$500 réis each. In 1722, Father António Cordeiro died. The chapel was remodeled in 1732, from an inscription on the tomb. On 18 July 1740, King
John V elevated the settlement to the status of
vila (
town). In 1759, the Jesuits abandoned the sanctuary, and the monarch nominated a treasurer to organize and catalogue the contents of the religious buildings and property of the clerics. Ultimately, the Crown took over the lands occupied and rented by the Jesuits. On 4 July 1774, the property of the residence, college of Lamego and the Monastery of Santa Maria de Cárquere were taken over, and João Pinheiro became the caretaker of the financial resources of the institutions. At the same time, the pious legacies, such as perpetual masses, were abolished by the state, underscoring the financial crisis of the time. By the end of the 18th century, the grand sanctuary, was limited to two altars: one dedicated to Saint Joseph and the other to ('Our Lady of Solitude'). On 20 December 1793, Queen
Maria I donated the sanctuary, its small courtyard, shops and surrounding buildings to the Bishop of Lamego. The bishop immediately ordered Joaquim Santa Rosa de Viterbo, from the Convent of Santo Cristo da Fraga to reinstate classes at the old College, which lasted until 1796, when, for the lack of students, the classes were limited to a basic curriculum. During the 1st half of the 19th century, the nativity was constructed (likely by local clerics). On 5 February 1805, José de Almeida Vasconcelos Soveral was named the first Viscount of Lapa, which was later transferred to his brother, Manuel de Almeida de Soveral Carvalho e Vasconcelos on 25 February 1813. On 21 August 1822, the first count of Lapa, Manuel de Almeida Vasconcelos de Soveral de Carvalho de Maia Soares de Albergaria was first invested in his title. In 1834, the Government of Portugal transferred the sanctuary, definitively, to the senate of Caria, followed ten years later (1844), with the return of the Church's possessions to the Bishopric of Lamego, by the Court of the Exchequer. This return had the effect of reigniting donatives and decoration in the sanctuary: in 1852, the painter Carlos Augusto Massa, from Cujó, began work on several works, in 1879, the retables were re-gilded (at a cost of 374$520 réis); issues with the azulejos, which were in deteriorating conditions, were addressed; and, in 1881, a new image of Saint Anthony was purchased. On 22 July 1884, João de Almeida de Araújo was named by bishop António da Trindade, to act as primary instructor at the college. By 23 October 1892, the college was reused in order to inaugurate a new seminary, by the bishop. Bishop António Tomás, established a commission on 14 August 1896, consisting of Plácido Augusto de Moura Vasconcelos, canon João Teixeira Fafe, canon Manuel Joaquim Mesquita Pimenta and Agostinho Augusto de Oliveira, with the objective of studying the possibility of reconstructing and redecorating the Church. Architect Adolphe Despony was onsite, on 14 September 1904, to study the possibility of constructing a new building. Just after the first lighting system entered the sanctuary (in 1905), the last courses developed by the seminary were being completed (between 1908–1909).
Republic On 15 October 1910, the land and buildings were confiscated by the new Republican government. Through the initiative of Father Francisco Pinto Ferreira, on 22 June 1916, during an easing of tensions between the church and Republican administration, the Marian cult, the ('Congregation of the children of Mary') was established. On 20 February 1923, chandeliers were fixed to the site, produced by a sawmiller from Moimeta and mounted by mason José da Costa. On 14 July 1929, the Ministry of Justice transferred the sanctuary to the
Roman Catholic Diocese of Lamego. The creation of the brotherhood of the ('Pious Union of Our Lady of Lapa'), on 29 May 1945, helped maintain the devotion to the Blessed Virgin Mary: by 1963, there were already 6729 brothers in its religious fraternity. This was also followed after the
Carnation Revolution (1975) with the creation of small community of ('Religious Sisters of Lapa'), who installed themselves alongside the lookout of . In 1988, a chapel was transferred to the site, dedicated to Saint
Francis of Assisi. Through the initiatives of Father José Alves Amorim, in 1994 the was remodelled to sell products typical of the region, while the became a museum (the ) dedicated to celebrating the history of the sanctuary. In addition the old college building and were retiled. ==Architecture==