The Duchy of Bohemia was founded in the late 9th century under Great Moravia. It was formally recognized as an Imperial State of the Holy Roman Empire in 1002 and became a kingdom in 1198. Following the Battle of Mohács in 1526, the whole Crown of Bohemia was gradually integrated into the Habsburg Monarchy. The Protestant Bohemian Revolt led to the Thirty Years' War. After the Battle of the White Mountain, the Habsburgs consolidated their rule. With the dissolution of the Holy Empire in 1806, the Crown lands became part of the Austrian Empire.