Olinda (1535) and Rio de Janeiro (1565), are characterized by having been founded near the sea but on land elevations, dividing the settlement into a high town and a low town. In general, the upper town was home to the residential and administrative areas and the lower part to the commercial and port areas, resembling the organization of the main Portuguese cities, such as Lisbon, Porto, and Coimbra, from ancient and medieval times. This arrangement obeyed defense considerations, since in the early days the colonial settlements were at constant risk of attacks from indigenous peoples and Europeans from other nations. In fact, almost all the first settlements founded by the Portuguese had walls, palisades, bastions, and gates that controlled access to the interior. Colonial urbanism in Brazil was often characterized by the adaptation of the layout of streets, squares and walls to the relief of the terrain and position of important buildings such as convents and churches. Although they did not follow the rigid checkerboard pattern of Spanish foundations in the New World, many colonial cities, starting with Olinda and Salvador, are now considered to have had their streets laid out with relative regularity. During the period of the Iberian Union (1580-1640), cities founded in Brazil had greater regularity, as is the case of Felipeia da Paraíba (now João Pessoa), founded in 1585, and São Luís do Maranhão, laid out in 1615 by Francisco Frias de Mesquita, with the trend towards regularity of urban center layouts increasing throughout the 17th century. Also noteworthy are the great urbanistic works carried out in Recife during the government of Count John Maurice of Nassau (1637-1643), who, with the embankment and construction of bridges, canals, and forts, transformed the old port of Olinda into a city. A determining aspect of colonial urbanism was the establishment of churches and convents. Often the construction of religious buildings was accompanied by the creation of a churchyard or a square next to the building, as well as a network of access streets, organizing the urban space. In Salvador, for example, the construction of the Jesuit College in the 16th century, outside the city walls, gave rise to the Terreiro de Jesus Square and made the area a pole of expansion of the city. Another notable example of colonial urban space is the Pátio de São Pedro, which arose from the construction of the São Pedro dos Clérigos Co-Cathedral