Although the capital, most of the businesses are in Borgo Maggiore. It is the third largest city in the country, after Dogana and Borgo Maggiore.
It borders the San Marino municipalities Acquaviva, Borgo Maggiore, Fiorentino, and Chiesanuova and the Italian municipality San Leo.
Akademio Internacia de la Sciencoj San Marino is centered here.
The city was founded by Saint Marinus and several Christian refugees in the year 301. From then on the city became a center of Christian refugees who fled from Roman persecution.
As a result, the city become the oldest republic in Europe, for the republic's territory at that time only included the single city of San Marino.
The urban heart of the city was protected by three towers: the first, Guaita, constructed in the 11th century, was famous for being impenetrable, which to a great extent discouraged attacks on the city.
Due to the Crusades, it was felt necessary to construct a second tower, Cesta (13th century).
But the Sanmarinense defensive system was not completed until the construction of a third tower, the Montale (14th century) - the smallest of all and constructed on the last of the summits of Monte Titano.
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 nine castelli which make up San Marino.
The economy of the city of San Marino has always been closely bound to that of the country.
Until recently, the main economic activities of the locality were stone extraction and carving. Today, there is a more varied economy, including tourism, commerce, sale of postage stamps, and a small agricultural industry, although the last is in decay.
The city is visited by more than three million people per year, and has developed progressively as a tourist center. Of the tourists, 85% are Italian.
There are also more than a thousand retail outlets, where one can find a great variety of products.
The town is known for its long, winding cobblestoned streets, as its altitude and steep approach put it beyond the reach of the San Marino Superhighway. San Marino is also notable in that cars are prohibited in much of the town center.
Before the Second World War, a railway was built from San Marino to Rimini under the dictatorship of Benito Mussolini.
Its tunnels, and the railway station 'Piazzale Lo Stradone', still exist. Proposals for the reopening of this railway have been presented to the government on several occasions, but thus far without action.
There is a regular bus service to Rimini, and a 1.5 km cable car line connects the capital with Borgo Maggiore.