During the Middle Ages, the kings of the Nordic countries founded many towns to make it easier to control their kingdoms. Trade also meant large profits. German merchants had great influence over the birth of many towns. The first town on the Baltic Sea founded according to the German model was Lybeck, built in the middle of the 12th century. Thereafter, Kalmar, Visby and Riga were built, followed by many other towns.