Construction of the fortress started in 1748 when Finland was still part of the Kingdom of Sweden. Sweden wanted to defend the sea areas against Russia. They also needed a place to fix their military ships. In 1808 Russia ruled Finland. They made the fortress stronger to defend Helsinki, which was now the capital of Finland.
In 1917 Finland became independent. In 1918 Viapori was taken over by the new Finnish government and was renamed Suomenlinna ( meaning "Castle of Finland"). Some of the islands were used as a navy school. There was also a prison, and prisoners worked to repair the old fortress.
Today, Suomenlinna is one of Finland's most popular tourist attractions. It is only a short ferry ride from Helsinki to visit Suomenlinna. It is a Unesco World Heritage site. It is also a living part of Helsinki city. Around 850 people live there.