The Basilica of San Marino - Pieve was erected on the site where, according to San Marino tradition, a stonemason who was later proclaimed a saint built the basilica on September 3, 301 AD. This date is taken as the origin of the Republic of San Marino because the city-state developed around this basilica. The saint died in 366, and according to legend, his last words were "I leave you free from both men.". This refers to the Emperor and the Pope, and these words are still considered the motto of the state. The Basilica of San Marino - Pieve that we can see today was built in 1836 on the site of an old basilica that was in very poor condition and is believed to date from the 7th century.