During the last decades of the 17th century the whole Finland was tried by the great years of crop failure. A large number of people, if not several hundreds, starved to death within Raahe. After the maelstrom of the years of famine the Great Northern War started. The Russian troops burned Raahe almost entirely in 1714. The handsome baroque town hall was destroyed, among other things. The whole town was deserted, those who could speak Swedish left for Stockholm or elsewhere Sweden. Others fled either to Northern Finland or to the woods for refuge. Those that stayed in town and those that were captured when fleeing had to suffer the horrors and the absurdity of the war. After the peace of 1721 the rebuilding of the town was begun. The houses were built on their former corner stakes, the town arose to its former place. The church was restored and a new town hall was built replacing the one burnt.
The town began to grow and prosper. At last, in 1791, Raahe obtained the staple town right and the right to sail freely to foreign countries. The most important export goods were pitch and tar, but also timber, pelts and butter. Besides merchant shipping, the townspeople of Raahe traded with the rural areas of inland, Savo and Karelia. The most important item imported was salt.
At the end of the 18th century, there were about 650 inhabitants in Raahe. The increasing prosperity of the town and the growing diversification of the means of livelyhood is shown by the rapid increase in the number of craftsmen. There were dyers, gold- and silversmiths, turners, tanners, ropemakers, shoemakers, coopers, carpenters, glass cutters etc. Journeymen and apprentices were increasing in number and skill.
A school had already been founded in Raahe in 1653. The schoolhouse stood on the north side of the church hill. The curate of the parish usually served as the teacher. The instruction took place in Swedish up till the beginning of the 19th century, although the Swedish speaking population did not begin to grow until at the end of the 18th century. The school was given a new two-storey house in 1758.
Prosperity was also evident in the streetscape: houses were enlarged and even raised. The new dwelling houses were usually built two-storey, dwelling rooms were placed in the gables of the high attic. The exterior of the houses was of log surface with no boarding. The roofing was usually of board or birch bark. Very few houses of the 18th century have survived in Raahe:
In the 18th century, a social classification was becoming evident in the structure of the town: the wealthy burghers, merchants, shipowners and the mayor settled down in the centre and in Rantakatu near the town hall. In the northern and eastern parts, i.e. somewhere around Saaristokatu and Reiponkatu, and in the new southern blocks, in the south side of the present-day Koulukatu, had settled craftsmen, seamen’s families and workers and the poorer people in general. This social classification was evident in the silhuet of the town not only in the sizes of the houses but also of the plots. In the centre of the town the houses and plots were big, and in the outskirts, on the narrow and small plots, there were log cabins with one or two rooms.
At the end of the century the town extended as far as the present-day Laivurinkatu in the south, Saaristokatu in the north and Tulliportinkatu or present-day Reiponkatu in the east. Due to the denouement of the War of Finland, Finland was separated from its centuries old mother country Sweden in 1809 and joined with the great Russia as a Grand Duchy.