In the mid-17th century, Rio de Janeiro still could not be considered a city free from attacks by enemy colonizing nations. So much so that, in 1646, the then governor Duarte Corrêa Vasqueanes wrote to the King of Portugal to stress the importance of moving the administrative institutions back to the upper part of the city, as well as building walls for the greater safety of its residents. But Rio de Janeiro's maritime vocation meant that the project did not go forward, and only the churches and fortresses remained on the hills, in order to protect the city against the “enemies of the king and of the faith.” Around 1649, the French military engineer Miguel Lescolle arrived from Portugal, with the mission of resolving the defense issues – a recurring concern in the early centuries of colonization.
In the reports prepared by Lescolle, the need was pointed out to fortify the Castelo, São Bento, Santo Antônio, and Conceição hills and to entrench a large part of the seafront. They were sent to the Overseas Council, which gave a favorable opinion of the engineer's intentions, but it is not known whether the projects were carried out as planned. The reports were transcribed by Gilberto Ferrez in 1972, but the seven city plans produced by Lescolle, unfortunately, were not found in Brazilian or Portuguese archives. It was the map by João Teixeira Albernaz, drawn up in an atlas produced in 1666, that survived.
“Aparencia do Rio de Janeiro com todos os Baixos e Ilhas”. Atlas do Brasil elaborado por João Teixeira Albernaz por volta de 1666. Acervo Biblioteca Nacional
From then on, several projects for the defense of Rio de Janeiro were presented by military engineers – the ones mainly responsible for most of the urban works of the colonial period. In January 1699, King Pedro II of Portugal ordered the creation of Aulas de Fortificação – training courses for soldiers to learn how to design and build fortifications.
In Rio, the Fortification Class was established as early as 1699, under the direction of the Portuguese military engineer Gregório Gomes Henriques. In 1738, the program was expanded with the Artillery Class, led by engineer José Fernandes Pinto Alpoim – an officer responsible for the construction of extremely important works in the city during the 18th century.
Desenho do engenheiro José Fernandes Pinto Alpoim. Retirado do site Engenharia em Revista
Although the idea of building a wall in the waterfront area had been raised since the mid-17th century, it was only carried out in 1713 – two years after the invasion by the corsair Duguay Trouin (1711) –, when the French engineer João Massé began the construction of a "simple wall around [the city]".
Planta da cidade de São Sebastião do Rio de Janeiro com suas fortificações (1713) – João Massé. Imagem em domínio público – Wikimedia Commons
But the wall, which limited the city to a small space, became a target of dissatisfaction already in the following decades, and it was never even completely finished. In the late 1720s, the Rio Senate requested the king's permission to build houses beyond the walls. The governor at the time, Luís Vahia Monteiro (1725 and 1732), despite considering Massé's wall useless, forbade the city from extending beyond it, arguing that the construction would become even more useless because of the "‘fábrica de novos edifícios[...]’. Estes só poderiam ser construídos caso se demolisse a muralha, o que levaria à ‘total condenação das fortificações’" (BICALHO, 2013, p. 13). Vahia Monteiro also proposed the construction of a canal that would serve as a moat, to protect the city.
Starting in the 1750s, Rio de Janeiro's growth toward the "sertões" completely eliminated the need to rebuild or improve the protective wall. The creation of new towns and settlements emerged as a better alternative for the occupation and protection of the city.
It looks like the source text you intended to include is missing — only "Referências:" (References:) was provided, with no content to translate. Could you please share the full text you'd like translated? Once I have it, I'll provide the English (US) translation following all the formatting rules (preserving markers, links, and placeholders exactly as specified).
BICALHO, Maria Fernanda. Rio de Janeiro in the 18th century: the transfer of the capital and the construction of the south-central territory of Portuguese America. URBANA: Electronic Journal of the Interdisciplinary Center for Urban Studies, Campinas, SP, v. 1, n. 1, p. 1–20, 2013.
CASTELLIANO, Luiz. A Brief History of the IME - Instituto Militar de Engenharia (Real Academia de Artilharia, Fortificação e Desenho, 1792). Instituto Militar de Engenharia: Rio de Janeiro, 2005.
CORRÊA-MARTINS, Francisco José. “Jeitinho carioca(?)”: the city of São Sebastião do Rio de Janeiro and its defensive system in three distinct moments of the colonial period. Sociedade Brasileira de Cartografia, Geodésia, Fotogrametria e Sensoriamento Remoto: Rio de Janeiro, 2013.