Bergen, historically Bjørgvin, is a city and municipality in Hordaland on the west coast of Norway. , the municipality's population was 278,121, and the Bergen metropolitan region has about 420,000 inhabitants. Bergen is the second-largest city in Norway. The municipality covers and is on the peninsula of Bergenshalvøyen. The city centre and northern neighbourhoods are on Byfjorden, 'the city fjord', and the city is surrounded by mountains; Bergen is known as the 'city of seven mountains'. Many of the extra-municipal suburbs are on islands. Bergen is the administrative centre of Hordaland and consists of eight boroughs—Arna, Bergenhus, Fana, Fyllingsdalen, Laksevåg, Ytrebygda, Årstad and Åsane. 

Trading in Bergen may have started as early as the 1020s. According to tradition, the city was founded in 1070 by king Olav Kyrre and was named Bjørgvin, 'the green meadow among the mountains'. It served as Norway's capital in the 13th century, and from the end of the 13th century became a bureau city of the Hanseatic League. Until 1789, Bergen enjoyed exclusive rights to mediate trade between Northern Norway and abroad and it was the largest city in Norway until the 1830s when it was surpassed by the capital, Christiania (now known as Oslo). What remains of the quays, Bryggen, is a World Heritage Site. The city was hit by numerous fires over the years. The Bergen School of Meteorology was developed at the Geophysical Institute beginning in 1917, the Norwegian School of Economics was founded in 1936, and the University of Bergen in 1946. From 1831 to 1972, Bergen was its own county. In 1972 the municipality absorbed four surrounding municipalities and became a part of Hordaland county.
And when was Bergen officially founded?
the city was founded in 1070