Malmö was for centuries the second largest Danish city while Scania was under Danish rule. It served as a trading hub in a very lucrative trade area, especially for the big yearly Scanian Market in herring trade in the 14th and 15th centuries. In 1658, as a result of many years of war, Denmark ceded the city to Sweden in the Treaty of Roskilde.
As the wars continued with Danish attempts to retake their lost lands, Malmö diminished under early Swedish rule and mainly became a fortress town.
After an industrial revolution in the 19th century, Malmö grew rapidly and served as one of the earliest and most industrialized cities of Scandinavia.
Today about one third of the Malmö population are from various other countries, making the city the most cosmopolitan in Sweden. This has contributed to a rich cultural life and many exotic and fine food opportunities. The industrial city of old with its large harbor areas has been replaced by vast areas of middle-class suburban housing and modern eco-friendly neighbourhoods.