There was a little settlement named Vehkalahti and known from 1336. In 1653 Vehkalahti got the city status as Vehkalahden Uusikaupunki (Veckelax Nystad) or new city of Vehkalahti. The city was badly ruined in 1712 by Russians troops of czar Peter I during Great Northern War (1700-1721). After Treaty of Nystadt of 1721 so called Old Finland (Vanha Suomi) become a part of Russian Empire and Vehkalahti become the important border Swedish fortress.
New fortress Fredrikshamn was founded above the city ruins. Local Finns call it Hamina. The fortress has a classic star shape form with six bastions after the fashion of Italian fortress of 16 AD. City lay-out has the central square with city-hall and eight radial streets. Swedish engineer Aksel von Leven was the author of project of the fortress.
In 1741 new war with Russia begun. It is known as "Lesser Wrath" in in comparison with "Great Wrath" (Northern War) of "Hat War" (hattarnas ryska krig - in the name of militant party in Swedish ricksdag). Only earth fortifications were built in the fortress at that time. June 1742 the fortress was yielded to Russian general Lassi without resistance. In 1743 Abo's Treatment was signed and new Swedish-Russian border was established at Kumi river to the west of Fredrikshamn. So the fortress fell to Russians.
New owners held the fortification works immediately. All the bastions and curtains were covered by stone and new huge bastion has been erected at the north side of the fortress. Great Russian General Alexander Suvorov inspected the fortress and watched it's modernization in 1790-th.
In 1783 empress Katherine II visited Fredrikshamn for meeting with Sweden king Gustav III. They were not amused each other and new Russian-Sweden war broke out soon in 1788.
So called Finland War of 1808-1809 finished Swedish rule in Finland. All Finland territory was included to Russian Empire for the "timeless period" because of the Frederikshamn Treaty of 1809. The Hamina fortress has lost it's military value from that time. Russian garrison stand in the fortress till 1836. Some part of the fortifications were demolished in 1890-th because the city growth.
In 1819 well known Cadet School was transferred to Hamina from Rantasalmi. Among notable Hamina cadets were , a politician, officer and a diplomat Carl Enckell, defence minister General Rudolf Walden, and Field Marshall Carl Gustav Mannerheim, who was expelled in his final year in 1886 due to disciplinary problems.
There were no significant events in Hamina history in 20BC apart from dissolution of Russian Empire and birth of independent Finland state in 1918, aerial bombardment during the WW2. Hamina nowadays is foremost Russian-trade oriented sea port, important town at the Helsinki-east border high-way and, of course, old Swedish-Russian fortress as a big tourist attraction in South Finland.
I have a very positive impressions of this fortress, as of most fortress of Finland. Admirable little town with ancient wooden houses is surrounded by impressive old bastions of old classic Italian system. There is the grandiose tent upon the stage of the Central bastion. I have been spectator at "Jesus Christ superstar" opera in Finnish.
Considerable part of the fortress is fenced and there are numerous "No tresspass!" signs on four languages. Alas, three bastions and ravelin are inaccessible.