Between 1460 and 1864 Flensburg was the second most important harbour in Denmark after Copenhagen. Since the 16th century Flensburg was an important place for trade. Flensburg became part of Prussia in 1864, after the Danish-Prussian War.