Esztergom (; ; Slovak: Ostrihom) is a city with county rights in northern Hungary, northwest of the capital Budapest. It lies in Komárom-Esztergom County, on the right bank of the river Danube, which forms the border with Slovakia there. Esztergom was the capital of Kingdom of Hungary from the 10th until the mid-13th century when King Béla IV of Hungary moved the royal seat to Buda.

Esztergom is the seat of the prímás (see Primate) of the Catholic Church in Hungary, and the former seat of the Constitutional Court of Hungary. The city has a Christian Museum with the largest ecclesiastical collection in Hungary. Its cathedral, Esztergom Basilica, is the largest church in Hungary. Near the Basilica there is a campus of the Pázmány Péter Catholic University.

Toponym The Roman town was called Solva. The medieval Latin name was Strigonium. The first early medieval mention is "ſtrigonensis [strigonensis] comes" (1079–1080).

The first interpretation of the name was suggested by Antonio Bonfini. He tried to explain it from Istrogranum, "city at the confluence of Ister (the Greek name of the Danube river) and Gran (the Latin name of the river Hron)". This interpretation is still popular.Magyarország régészeti topográfiája, Volume 5, Akadémiai Kiadó, 1979, p. 83, István Filep, Zoltán Nagy (editors), Esztergom, Magyar Távirati Iroda, 1989, p. 10, Communicationes de historia artis medicinae, Volumes 27–29, Budapest (Hungary)., Orvostörténetï közlemények, Országos Orvostörténeti Könyvtár, Semmelweis Orvostörténeti Múzeum, 1963, p. 123 attempted to derive the name from Germanic languages. After the conquest of the country by Charlemagne, the Franks should give the name Osterringun to their easternmost castle; as a comparison, a reference is made to the town of Östringen. Pavel Jozef Šafárik tried to explain the name from Slavic ostřehu (). suggested a Slavic personal name Stigran without a deeper analysis of its origin.

In 1927, Konrad Schünemann summarized these older views and proposed the origin in a Slavic stem strěg ("custodia", guard). This theory was later extended by Ján Stanislav who also explained the origin of the initial vowel missing in Latin and later Czech sources (Střehom). The introduction of a vowel before the initial consonant group is a regular change in the Hungarian language (Stephan → István, strecha → esztercha), but the initial "O" in later Slavic forms can be explained by an independent change–an incorrect decomposition of the Slavic prepositional form. Both authors noticed the high number of Slavic placenames in the region (Vyšegrad, Pleš, Kokot, Drug, Komárno, Toplica, etc.) and similar Slavic names in other countries (Strzegom, , Stregowa, etc.). Both authors believed that the stem strěg was a part of the Slavic personal name, but Šimon Ondruš suggests a straightforward etymology. The Proto-Slavic – to watch, to guard, present participle stregom, strägom – a guard post. The later Slavic form was created by an incorrect decomposition as follows: vъ Strägome (in Strägom) → vo Strägome → v Osträgome like Slovak Bdokovce → Obdokovce, Psolovce → Obsolovce.

considered the name to be of uncertain origin, potentially derived also from Slavic (a tanner) or Proto-Bulgaric , – a leather armor. However, the last theory is sharply criticized by Šimon Ondruš as obsolete and unreliable, because of its dependency on later sources, the high number of Slavic names in the region and missing adoption of the word in the Hungarian language.

Other names of the town are Croatian Ostrogon, Polish Ostrzyhom, Serbian Ostrogon and Estergon (also Turkish), Slovak Ostrihom and Czech Ostřihom (the archaic name is Střehom). The German name is Gran (), like the German name of river Garam.

Right across the Danube on the Slovak side, there is a populated place of Štúrovo which in Hungarian is known as Párkány. The word Parkan in Belarusian, Polish, and Ukrainian languages is a common word for fenceline.

History

Esztergom is one of the oldest towns in Hungary. Esztergom, as it existed in the Middle Ages, now rests under today's town. The results of the most recent archeological excavations reveal that the Várhegy (Castle Hill) and its vicinity have been inhabited since the end of the Ice Age 20,000 years ago. The first people known by name were the Celts from Western Europe, who settled in the region in about 350 BC. A flourishing Celtic settlement existed on the Varhegy until the region was conquered by Rome. Thereafter it became an important frontier town of Pannonia, known by the name of Salvio Mansio, Salvio, or Solva. By the seventh century the town was called Stregom and later Gran, but soon reverted to the former, which evolved into Esztergom by the thirteenth century. The German and Avar archaeological finds found in the area reveal that these people settled there following the period of the migrations that were caused by the fall of the Roman Empire.

At about 500 AD, Slavic peoples immigrated into the Pannonian Basin. In the 9th century, the territory was mostly under Frankish control, and it might have been part of Great Moravia too. In Old Slavonic language, it was called Strěgom ("guard"), as it was strategic point of control for the Danube valley.

The Magyars entered the Pannonian Basin in 896 AD and conquered it systematically, succeeding fully in 901. In 960, the ruling prince of the Hungarians, Géza, chose Esztergom as his residence. His son, Vajk, who was later called Saint Stephen of Hungary, was born in his palace built on the Roman castrum on the Várhegy (Castle Hill) around 969–975. In 973, Esztergom served as the starting point of an important historical event: during Easter of that year, Géza sent a committee to the international peace conference of Emperor Otto I in Quedlinburg. He offered peace to the Emperor and asked for missionaries.

The prince's residence stood on the northern side of the hill. The center of the hill was occupied by a basilica dedicated to St. Adalbert, who, according to legend, baptised St. Stephen. The Church of St. Adalbert was the seat of the archbishop of Esztergom, the head of the Roman Catholic Church in Hungary. By that time, significant numbers of craftsmen and merchants had settled in the city.

Stephen's coronation took place in Esztergom on either Christmas Day 1000 or 1 January 1001. From the time of his rule up to the beginning of the 13th century, the only mint for the country operated here. During the same period, the castle of Esztergom ("Estergon Kalesi" in Turkish) was built. It served not only as the royal residence until the Mongol siege of Esztergom in 1241 (during the first Mongol invasion), but also as the center of the Hungarian state, religion, and Esztergom county. The archbishop of Esztergom was the leader of the ten bishoprics founded by Stephen. The archbishop was often in charge of important state functions and had the exclusive right to crown kings.

The settlements of royal servants, merchants and craftsmen at the foot of the Várhegy (Castle Hill) developed into the most significant town during the age of the Árpád dynasty– these being the most important area of the economic life of the country. According to the Frenchman Odo of Deuil, who visited the country in 1147, "the Danube carries the economy and treasures of several countries to Esztergom".

The town council was made up of the richest citizens of the town (residents of French, Spanish, Dutch, and Italian origin) who dealt with commerce. The coat of arms of Esztergom emerged from their seal in the 13th century. This was the town where foreign monarchs could meet Hungarian kings. For example, Emperor Conrad II met Géza II in this town (1147). Another important meeting took place when the German Emperor Frederick Barbarossa visited Béla III. The historians traveling with them all agree on the richness and significance of Esztergom. Arnold of Lübeck, the historian with Frederick Barbarossa, called Esztergom the capital of Hungarian people ("quae Ungarorum est metropolis").

In the beginning of the 13th century, Esztergom was the center of the country's political and economic life. This is explained by the canon of Nagyvárad, Rogerius of Apulia, who witnessed the first devastation of the country during the Tatar siege of Esztergom and wrote in his Carmen Miserabile ("Sad Song"): "since there was no other town like Esztergom in Hungary, the Tatars were considering crossing the Danube to pitch a camp there", which was exactly what happened after the Danube froze. The capital of the Árpád-age was destroyed in a vicious battle. Though, according to the documents that remained intact, some of the residents (those who escaped into the castle) survived and new residents settled in the area and soon started rebuilding the town, it lost its leading role. Béla IV gave the palace and castle to the archbishop, and changed his residence to Buda. Béla IV and his family, however, were buried in the Franciscan church in Esztergom which had been destroyed during the invasion and which had been rebuilt by Béla IV in 1270.

Following these events, the castle was built and decorated by the bishops. The center of the king's town, which was surrounded by walls, was still under royal authority. A number of different monasteries did return or settle in the religious center.

Meanwhile, the citizenry had been fighting to maintain and reclaim the rights of towns against the expansion of the church within the royal town. In the chaotic years after the fall of the House of Árpád, Esztergom suffered another calamity: in 1304, the forces of Wenceslaus II, the Czech king occupied and raided the castle. In the years to come, the castle was owned by several individuals: Róbert Károly and then Louis the Great patronized the town. In 1327 Kovácsi, the most influential suburb of the town, lying in the southeast, was united with Esztergom. The former suburb had three churches with mainly blacksmith, goldsmith, and coiner residents.

In the 14th and 15th centuries, Esztergom saw events of great importance and became one of the most influential acropolises of Hungarian culture along with Buda. Their courts, which were similar to the royal courts of Buda and Visegrád, were visited by such kings, scientists, and artists as Louis the Great, Sigismund of Luxembourg, King Matthias Corvinus, Galeotto Marzio, Regiomontanus, the famous astronomer Marcin Bylica and Georg von Peuerbach, Pier Paolo Vergerio and Antonio Bonfini, King Matthias's historian, who, in his work praises the constructive work of János Vitéz, King Matthias's educator. He had a library and an observatory built next to the cathedral. As Bonfini wrote about his masterpiece, his palace and terraced gardens: "he had a spacious room for knights built in the castle. In front of that, he built a wonderful loggia of red marble. In front of the room, he built the Chapel of Sibyls, whose walls were decorated with paintings of the sybils. On the walls of the knights' room, not only the likeness of all the kings could be found, but also the Scythian ancestors. He also had a double garden constructed, which was decorated with columns and a corridor above them. Between the two gardens, he built a round tower of red marble with several rooms and balconies. He had Saint Adalbert's Basilica covered with glass tiles". King Matthias's widow, Beatrix of Aragon, lived in the castle of Esztergom for ten years (1490–1500).

The time of the next resident, Archbishop Tamás Bakócz (d. 1521) gave the town significant monuments. In 1507 he had Italian architects build the Bakócz chapel, which is the earliest and most significant Renaissance building which has survived in Hungary. The altarpiece of the chapel was carved from white marble by Andrea Ferrucci, a sculptor from Fiesole in 1519.