In the 9th century, Magyar tribes moved to the area of present-day Hungary and the Árpad Dynasty was established. In the year 1000, the Magyar prince Stephen was crowned King Stephen I, with a crown sent from Rome by the pope, and Hungary, kingdom and nation, was officially born. In 1526, the Ottoman Turks crushed Hungary's army at the Battle of Mohács. The defeat marked the end of a relatively prosperous and independent Hungary, and sent the nation into a tailspin of partition and foreign domination. After the end of Turkish occupation in 1699, the country became a province of the Austrian Habsburg Empire. Hungary blossomed economically and culturally under the Habsburgs, but so did thoughts of nationalism.