After its foundation in 1191 Berne was enlarged by stages. In 1353 it joined the Swiss Confederation. The medieval structure of the city has remained unchanged to the present day. In 1798 Napoleon’s troops invaded Berne. In 1834 it became a university town and in 1848 the Federal Capital of Switzerland.