An important area of Antal Grassalkovich I's (1694–1771) art patronage was the erection of ecclesiastic buildings. Máriabesnyő is particularly significant, for it did not only become a popular place of pilgrimage in the region owing to a votive statue, but it also became the burial place of the founder since it was close to his mansion in Gödöllő. A sofar unknown 18th century pictorial source of the Besnyő convent was found in the Capuchin archives in Vienna, which calls for a revision of the building phases of the baroque monastery. The ink and wash drawing by a hand of little talent shows the building complex from two directions on the basis of on-the-spot observation. The monastery was built in three major phases. After the foundation, first the small Loretto Chapel was erected (with the monks' crypt under it) using the mediaeval ruins (1759–1762) together with the dwelling(s) of the hermits, which were either three small hermitages or a part of the groundfloor section of today's western wing. The convent was built on the plans of master builder János Mayrhoffer of Pest in the second phase (1763–1767); its U-shape enclosed a court with the Chapel on the fourth side. The monastery consists of one-storey wings. The oratory is in the southern, the refectory in the eastern wing. On the gable of the southern end of the latter a sun dial was made in 1765 as the Historia Domus registered, on the basis of which the baroque veduta must be dated to 1765/1766 (since the church, the southern corridor and the sacristy are still missing). On the eastern side of the monastery a hanging garden was created with cellars under it. The church with two vault sections and chancel was built on the western side of the Loretto Chapel in 1768–1771 with a portico in front and an undercroft and the crypt of the Grassalkovich family. Mayrhoffer's plan survives in Gyula Wälder's 20th century copy; it contains part of the groundplans of the three levels. The Historia Domus claims that a painter of Pest Ferenc Winkler painted a picture of the Virgin of Besnyő for the cloisters, and he is named as the decorator of the corner tower at the southeastern end of the hanging garden.
After his death Béla III (r. 1172-96) was buried in the venue of coronations and burials of medieval Hungarian kings, the provost church of the Virgin in Székesfehérvár. After the Ottoman rule and the subsequent demise of the church the location of the grave fell into oblivion. The king’s and his wife’s mortal remains were found accidentally in December 1848. Custos of the National Museum János Érdy had the valuable finds and the rest of the grave goods transported to the museum. The significance of the discovery was largely enhanced when scientific research soon verified that it was Béla III’s grave, the only identified royal grave in Székesfehérvár.
During the military operations of the ongoing war of liberation of 1848/49, then in the period of retaliations after the crushing of the freedom fighting the idea of reburying the royal remains in the manner they reserved could not even be raised. In 1859 Ágoston Kubinyi, director of the National Museum commissioned Ferenc Reitter to make a plan for the extension of the museum. The arcade in classical or Rundbogenstil to be erected on the rear limit of the plot would have been terminated at either end with a chapel. Kubinyi wanted to deposit the royal remains and the grave goods in a worthy environment in the chapels. Governor of Hungary Móric Pálffy was shocked to find during a visit to the museum that the bones were in the museum and visitors were allowed to view them without, he thought, the right conditions of reverence being available. He immediately ordered the remains to be buried quietly. In vain did Kubinyi argue that the planned chapels would be worthy places of rest for them, the political situation still did not allow that the grave of the only identified king of the Árpád dynasty be buried in the museum of the nation, in such an exposed place. The remains of the royal couple were buried in the baroque crypt of the Matthias Church on 10 July 1862 in a simple funeral ceremony celebrated by archbishop of Esztergom János Scitovszky. The memorial service was held a year later on 26 March 1863 when a (new) verification process at the Academy of Sciences had confirmed that the remains did belong to Béla III and his wife.
Owing to the reconstruction of the Matthias Church begun under Frigyes Schulek’s guidance in 1873, the remains were transferred to the Anthropological Institute in 1883 where the director Aurl Török put them to scrutiny. The protraction of the renovation also kept putting off the case of reburial. The consecration of the church took place in 1896 as part of the millenary festivities. However, the theme of the festive series was much more Francis Joseph I and the restored Hungarian constitutionalism than the thousand-year-old Hungarian state, consequently the ceremonious reburial of Béla III was left out of the program, although it had been called for by the press. After 1896 at last Aurél Török launched a press campaign and a parliamentary interpellation on 13 February 1897 cata lyzed the events. Under the leadership of Prime Minister Dezső Bánffy the minister of religion and public education Gyula Wlassics organized the royal reburial in cooperation with the Monuments Commission and the building committee of the church. After a long debate the funerary monument was built in the Holy Trinity chapel of the upper church after plans by Frigyes Schulek. (At the beginning Schulek designed a more modest tomb for the crypt, but now it was out of the question.) He took the carvings of French portal pediments (Chartres, Arles) as his models. The sculptural work was done by Ferenc Mikula. A genealogical table on the monument announced that Francis Joseph I descended from the Árpád dynasty on female line. This reference is also included in the royal deed of gift by which the king granted 25 000 florins for the monument and the burial. At last on 21 October 1898 the ceremonious burial took place as a national holiday, officiated by archbishop of Esztergom Kolos Vaszary.