Way before the arrival of the Magyars, the Carpathian Basin - beginning in Transylvania and extending as far as the Alps to the west - was inhabited by a number of nomadic tribes. They were succeeded by the Celts, who were in turn driven away by the Romans.

The Roman Empire
At the dawn of Christianity, Emperor Augustus entered the region to establish the province of Pannonia. Evidence of Roman rule can be found in Pécs, Sopron and Aquincum, the former garrison town in the north of Budapest, which has its own amphitheatre and baths.

The Huns and other tribes
The Romans withdrew in the fourth century, leaving a void that was occupied by the Vandals and Jazygians (whose Hungarian towns bear the prefix "Jász" even today), before the short-lived arrival of the all-conquering Huns in the mid 5thcentury. This warring tribe bears little relation to the people later to be known as Hungarians, although the name of Attila, their buccaneering leader, is still popular. After the decline of the Huns, the area was settled by a number of smaller Germanic tribes, before the Turkish Empire moved in, only to be defeated by Charlemagne in 796.

The arrival of the Magyars
The Magyars, Finno-Ugric people, originated from somewhere in the Ural mountains before migrating west and settling in Etelköz, a region above the Black Sea. Here, seven Magyar tribes are believed to have joined forces with three Kavar tribes to create the Onogur or "Ten Arrows" alliance, which is believed to be the origin of the word Hungary. Prompted by overpopulation and the threat of attack, elected leader Árpád guided the Magyars further west into the largely unoccupied Carpathian Basin in 896. This is still celebrated by Hungarians as "honfoglalás" - the conquest.

The coronation of Saint Stephen
As the Magyars laid down roots in the region, links were established to Bavaria and, more importantly, Rome. On Christmas Day in the year 1000, Szent István (Saint Stephen), a direct descendent of Árpád, was crowned Hungary's first Christian King, accepting his crown from Pope Sylvester II. Assisted by Szent Gellért, he immediately set about converting his pagan subjects to Christianity.

Rape and pillage at the hands of the Mongols
After Stephen's death the country was shackled by poor leadership, the excessive power of the nobility and ongoing struggles for the throne, leaving it vulnerable to attack. The Mongols arrived in 1241, destroying most of the Puszta (Great Plain) and bringing famine and plague. When they withdrew a year later, the Hungarians were almost back at square one, turning to foreign settlers to help with rebuilding.

Foreign rule
The end of the Árpád dynasty in 1301 left a power vacuum that foreign families were keen to occupy. Eventually, Charles Robert (Róbert Károly) seized the throne and ushered in a period of peace and expansion that was continued by his son Louis the Great (Nagy Lajos) - although taxation on the peasant underclass was oppressive. By the time Sigismund of Luxembourg, the wife of Nagy Lajos's daughter took power in 1387, the threat of the Ottoman Empire was very real.

Hungary under King Mátyás
Much confusion followed the death of Sigismund, but this was eventually eased by the coronation of Mátyás, the Renaissance King, after a coup in 1458. The son of a János Hunyadi, a Transylvanian warlord of Romanian descent responsible for repelling the Turks in 1456, Mátyás is remembered fondly even today. Alongside his influential Italian wife Beatrice, the new king introduced noblemen to the concept of taxation, building a formidable army and impressive palaces in Budaand Visegrád.

Defeat by the Turks at Mohács
The decline that followed the death of King Mátyás in 1490 included a bloody but fruitless peasant revolt, gross mismanagement and widespread corruption. Hungary reached a nadir with the crushing defeat at Mohács in 1526. King Louis, crowned aged nine, was only 19 when he hastily scraped together a makeshift army, including a number of bishops and noblemen, and headed south to head off the advancing Turks. The resulting humiliation is still considered the worst in Hungarian history and marked the beginning of 150 years of Ottoman occupation of much of the country, including Buda.

Hungary divided
During the period of Ottoman rule of central areas of Hungary, the north-west of the country was occupied by the Habsburgs as a buffer zone to protect Vienna. To the east, Transylvania enjoyed some independence and a period of cultural prominence. In central Hungary, pockets of brave but temporary resistance to the Turks remained, most notably in Eger and Kőszeg. A long period of decline ensued and conflict between the three areas was never far away.

The Habsburg Empire
When the Turks were finally ousted at the end of the 17th century, a long period of Habsburg rule followed. This was characterized by heavy taxation of the nobility and political oppression, which sparked a war of independence led byFerenc Rákóczi II. When the dust settled and the competent Maria Theresa took control of the empire, the Hungarian gentry enjoyed a revival. During this period, many of today's palaces and Baroque town centers were built, and Vienna pursued an active policy of Germanization. At the same time, settlers from all over Europe were encouraged to lay down roots and the huge peasant population - almost 90 per cent of the population - continued to live as serfs, fuelling the nationalist fire.

The 1848 War of Independence and the Ausgleich
Hungarian nationalism, opposition to Habsburg rule and resentment of the nobility was led by Ferenc Deák, Lajos Kossuth and István Széchényi, Hungary's most celebrated statesmen. Although significant reforms were achieved without bloodshed, the declaration of independence inspired by the radical lawyerKossuth, and the considerable influence of poet Sándor Petőfi, prompted Habsburg forces to regain control. Eventually a compromise (Ausgleich) was brokered in 1867 by Deák effectively creating a dual monarchy with twin parliaments and capitals. A period of real prosperity followed, illustrated by much of the Art Nouveau architecture celebrated today. This rapid economic development was cut short by the outbreak of World War I.

World War I and Trianon
Shackled by its alliance with the Habsburg monarchy, Hungary suffered on two counts in the aftermath of World War I. The military defeat left the country decimated and the post-war Treaty of Trianon (signed in Versailles, France) the borders were redrawn, cutting off two thirds of historical Hungary. This left sizeable Hungarian minorities in Slovakia, Romania and Serbia and is still bitterly resented - maps of Nagymagyarország, literally "Greater Hungary", are still proudly displayed throughout the country.

A brief flirtation with Communism and Admiral Horthy
In the confusion before Trianon, the world's second Communist government was established by Béla Kun, a soldier taken prisoner by the Russians who returned to lead the Bolshevik movement. His popularity quickly waned as the effects of nationalization became clear. A brief reign of "Red Terror" followed to keep dissenters in check. The government only survived five months before it was toppled by French-sponsored Miklós Horthy and a spate of right-wing "White Terror" emanating from Szeged. A distinguished admiral during the preceding war, Horthy immediately appointed himself regent and promoted conservatism, patriotism and opposition to the Trianon Treaty.

World War II
Driven by bitterness about the loss of land at Trianon, Hungary sided with Hitler's axis for much of the Second World War. Initially, this resulted in the return of Transylvania, but the government went too far in attacking the Russians, suffering crushing losses at Voronezh, before Stalingrad. Eventually, demands on labor and resources from Germany became too much, and Horthy was on the brink of declaring neutrality when Hitler occupied Hungary in March 1944. The Arrow Cross Party, based at what is now the House of Terror museum, rose to power, eliminating opposition politicians and enforcing anti-Jewish legislation that sent hundreds of thousands of Hungarians to Auschwitz. In the last days of the war, the Germans refused to hand Budapest over lightly, destroying all bridges over the Danube and forcing the advancing Russians to take the city by force in a vicious street battle.

Communist terror and the 1956 uprising
On the insistence of the occupying Russians, a Communist government, under Mátyás Rákosi, was imposed on the Hungarian people. Elections were rigged and political terror reigned, with the AVÓ (later renamed AVH) moving into the Arrow Cross headquarters on Andrássy út. Nationalization and industrialization followed, but with the death of Stalin in 1953 and party infighting, the terror began to abate. This encouraged 50,000 university students to rebel in 1956, capturing the state radio, hauling down a huge statue of Stalin and two days later, Imre Nagy formed a new government. Hope for a new Hungary lasted just two weeks, Soviet tanks entered Hungarian cities, Nagy was executed and thousands fled to the west.

Goulash Communism and the fall of the Iron Curtain
Under János Kádár, the Party leader installed by the Soviets, some elements of the free market were introduced to the planned economy. Goulash Communism resulted in limited affluence, but by the 80s the economic cracks were beginning to show. Throughout the Eastern Bloc, the need for reform and liberalization became increasingly necessary. The demise of Communism in Hungary was relatively painless, the People's Republic was renamed the Republic of Hungary and opposition parties were declared legal in October 1989. At the same time, the fencing on the Austrian border was removed, allowing holidaying East Germans to enter the West for the first time. Erich Honecker responded by closing the borders of East Germany, sparking a revolution that spread throughout the region.

Democracy and EU entry
Today's Hungary is characterized by a rapidly changing political and economic scene, with optimism and uncertainty present in equal measure. Accession to the EU in May 2004 has also brought new opportunities and exposed Hungarian businesses to increased competition. Hungarian history is still being made.