With the population of the city increasing, the territory of the country was extended by a few square kilometers. Since the Sanmarinese policy was not to invade or to use war to obtain new territories, it was by means of purchases and treaties that San Marino obtained the other eight ''castelli'' which make up the country.