The name Belgrade (or Beograd in Serbian), which, not just in Serbian but in most Slavic languages, means a "white town" or a "white fortress", was first mentioned in AD 878 by Bulgarians. The fortress kept changing its masters: Bulgaria during three centuries, and then the Byzantines and then again Bulgarians. The fortress remained a Byzantine stronghold until the 12th century when it fell in the hands of the newly emerging Serbian state. It became a border city of the Serbian Kingdom, later Empire with Hungary. The Hungarian king Béla I gave the fortress to Serbia in the 11th century as a wedding gift (his son married the Serbian princess Jelena), but it remained effectively part of Hungary, except for the period 1282–1319. After the Serbian state collapsed following the Battle of Kosovo, Belgrade was chosen as the capital of Despot Stefan Lazarević in 1402. Major work was done to the ramparts which were encircling a big thriving town. The lower town at the banks of the Danube was the main urban center with a new built Orthodox cathedral. The upper town with its castle was defending the city from inland. Becoming a major trade and cultural center, Belgrade became a significant immigration town, with immigrants settling from other parts of Serbia, Dubrovnik, Bulgaria, Hungary, Germany, Italy and Venetia. Population blossomed, so the lower city of the fortress, which was the busiest part of the city, had to be significantly expanded. Belgrade remained in Serbian hands for almost a century. After the Despot's death in 1427, it had to be returned to Hungary. An attempt by the Ottoman Sultan Mehmed II in 1456 to conquer the fortress was prevented by Janos Hunyadi (Siege of Belgrade), saving Hungary from Ottoman dominion for 70 years. Early Modern In 1521, 132 years after the Battle of Kosovo, the fortress, like most parts of the Serbian state, was conquered by the Turks and remained (with short periods of the Austrian and Serbian occupation), under the rule of the Ottoman Empire until the year 1867, when the Turks withdrew from Belgrade and Serbia. During the short period of Austrian rule (1718–1738), the fortress was largely rebuilt and modernized. It witnessed the Great Serbian Migration in the 17th century and two Serbian Uprisings in the 19th century, during the Turkish Period. During the Austrian occupation of northern Serbia 1717–39, several hospitals were established in Belgrade. The