As Guilherme José Ferreira de Assunção later wrote, after a few visits, Queen Maria realized the advantages of establishing a military contingent in the Convent of Mafra, which she initiated. This change transformed the region and its people, who lived in a "precarious conditions of existence". After 1840, the Convent was occupied by the army. By 1859, 4000 troops would enlist in the official military boot-camp (), established by King Pedro V. Unfortunately, the institution was abolished in the following year, when 94 recruits died from an infectious disease. But, from 1848–1859 and 1870–1873, the convent continued to house the Royal Military College ().