In the Middle Ages, it was the site of Old Prussian settlement Twangste. In 1255, during the Northern Crusades, a new fortress was built by the Teutonic Knights. The city became the capital of the Duchy of Prussia and East Prussia (part of Germany). It was heavily damaged during World War II and its population fled or was removed by force when it became a Russian city. According to the 2010 Census, its population was 431,902.