Transylvania became part of the Kingdom of Hungary in 1002, and it belonged to the Lands of the Hungarian Crown until 1920. After the Battle of Mohács in 1526 it belonged to the Eastern Hungarian Kingdom, from which the Principality of Transylvania emerged in 1570 by the Treaty of Speyer.