The beginnings of Budapest can be traced back to 1 AD when the Celts first settled in the region. Later the Romans took over and made the site a fortified military camp which lasted until 829 AD when the victory of the Bulgarian army over the Holy Roman Emperor Louis the Pious shaped the area into two Bulgarian military fortresses, Buda and Pest which occupied opposite sides of the Danube River. The Hungarians, led by the Arpad dynasty, eventually settled in the 9th century, eventually founding the Kingdom of Hungary. However it wasn’t until the Tartar invasion in the 13th century that King Bela IV ordered the building of the royal palace on the hills of Buda; the city would become the capital of Hungary in 1361.
During the reign of Matthias Corvinus, the city went through a golden age and became a cultural hub for Central Europe. The Italian Renaissance had a great influence on the architecture and design of the royal palace and the Corvina Library was second only to the Vatican in terms of size and important documents. However the golden age was not to last because in 1526 the Ottoman Turks came plundering in Buda, eventually occupying it in 1549 which was to last for 140 years. In 1686 the Holy League Army, made up of soldiers from all over Europe, invaded resulting in the Turks signing the Treaty of Karlowitz which recognised territorial changes; the entire Kingdom of Hungary was eventually removed from Ottoman rule in 1718. However in the result, Budapest came under Hasburg rule and the next century was endless struggle for the Hungarians to claim independence and modernization.
The socio-political back-drop of Budapest was to change with 1897, the year of Reconciliation, which brought about the birth of Austria-Hungary. This now made Budapest the twin capital of a dual monarchy but it also gave the city a second golden age by instigating cultural developments. In 1873 the cities of Buda and Pest were officially merged with the third part, Óbuda (Ancient Buda), thus producing the metropolis of Budapest as we see today. Pest grew into the country's administrative, political, economic, trade and cultural hub. The capital, Budapest, was 23% Jewish. Due to the prosperity and the large Jewish community of the city, Budapest was often called the "Jewish Mecca".
However it was not to last with World War I bringing about the end of the second Golden Age. By 1918, Austria-Hungary had lost the war and as consequence, collapsed; the trade-off was that Hungary got to declare itself an independent republic. In 1920 the Treaty of Trianon finalized the country's separation but Hungary lost over two-thirds of its territory. World War II was to bring about more strife with the city being partly destroyed by British and American air raids in 1944. The worst was yet to come with the period from 24th December 1944 to 13th February 1945, culminating in the Battle of Budapest. The attacking Soviet troops and the defending German and Hungarian troops caused major damage to the city with all bridges destroyed by the Germans and deaths of 38,000 civilians. The war also brought the death of between 20% and 40% of Budapest's 250,000 Jewish inhabitants who died through Nazi and Arrow Cross Party genocides during 1944 and early 1945. Despite this, modern day Budapest has the highest number of Jewish citizens than of any other European city.
In 1949, Hungary was declared a communist People's Republic but this new government considered buildings like the Buda Castle as symbols of the former regime, resulting in all the interiors being destroyed. In 1956, peaceful demonstrations in Budapest led to the outbreak of the Hungarian Revolution. The Leadership collapsed under the mass demonstrations that began on 23 October; but Soviet tanks entered Budapest to crush the revolt with a ceasefire announced in November. The Revolution left more than 3000 dead.
From the 1960s to the late 1980s, Hungary’s population would reach 2.1 million and this period saw much redevelopment in Budapest with much of the wartime damage to the city finally being repaired. Buda Castle and the banks of the Danube were included in the UNESCO list of World Heritage Sites in 1987; Andrassy Avenue (including the Millennium Underground Railway, Hősök tere and Városliget) would be added to the list in 2002.