In 1219, the Danish King, Valdemar II, landed in Lindanise (Danish: "Lyndanisse") and conquered both Revala and Harju counties, while the inhabitants were forced into Christianity. At the end of the Livonian Crusade (1208–1227 in Estonia), both counties were captured by the Order of the Sword Brothers until given back to Denmark with the Treaty of Stensby in 1238.