Established in Prussia and the previously (and presently) Polish Chełmno Land in the 13th century, the state expanded mostly as a result of the 13th-century Prussian Crusade against the pagan Baltic Prussians and the 14th-century invasions of neighboring Christian countries of Poland and Lithuania. The conquests were followed by German and Polish colonization. In addition, the Livonian Brothers of the Sword controlling Terra Mariana were incorporated into the Teutonic Order as its autonomous branch Livonian Order in 1237. In 1346, the Duchy of Estonia was sold by the King of Denmark for 19,000 Cologne marks to the Teutonic Order. The shift of sovereignty from Denmark to the Teutonic Order took place on 1 November 1346. At the turn of the 14th and 15th centuries, the Teutonic Order temporarily acquired the territories of Gotland and Neumark, which, however, it sold in the following decades. Throughout its history, the Teutonic state waged numerous wars with Poland and Lithuania, encouraging both countries to form a close alliance and personal union, which eventually led to the creation of the Polish–Lithuanian Commonwealth in the 16th century.