Hungary–Poland relations date back to the Middle Ages. The two Central European peoples have traditionally enjoyed a very close friendship, brotherhood and camaraderie rooted in a deep history of shared rulers, cultures, struggles, and faith. Both countries commemorate their fraternal relationship on 23 March. From 1370 to 1382 the Kingdom of Poland and Kingdom of Hungary entered into a personal union and were ruled by the same King, Louis the Great. This period in Polish history is sometimes known as the Andegawen Poland. Louis inherited the Polish throne from his maternal uncle Casimir III. After Louis's death the Polish nobles (the szlachta) decided to end the personal union, since they did not want to be governed from Hungary, and chose Louis's younger daughter Jadwiga as their new ruler, while Hungary was inherited by his elder daughter Mary. A second personal union with Poland was formed for the second time from 1440 to 1444, when King Władysław III of Poland was also King of Hungary.

Both countries are full members of NATO, joining it on the same day (March 12, 1999) and are also both members of the European Union, the OECD, the Council of Europe, the Visegrád Four (along with Slovakia and the Czech Republic), the Bucharest Nine, the Three Seas Initiative, the OSCE and the World Trade Organization.

The leaders of the two countries have been holding regular secret meetings to improve bilateral relations and work more closely together. Hungarian-Polish political scientist Dominik Hejj states: "The relations are very strong, and almost every week a Polish minister visits Hungary and vice versa". The two countries first joined NATO in 1999 and then the European Union in 2004.

Historic relations

Good relations between Poland and Hungary date back to the Middle Ages. Both countries shared a border for nearly 800 years, from the 10th century to the First Partition of Poland in 1772. The Polish and Hungarian ruling dynasties (such as the Piast dynasty or House of Árpád) often intermarried.

Since the mid-13th century, trade between Hungary and Poland has increased significantly, as well as the transit of Hungarian goods through Poland to Baltic ports and German countries, and foreign (Flemish, English, German) products in the opposite direction, reaching its peak during the Hungarian-Polish union under the reign of Louis I.

In 1320 King Charles I of Hungary married Princess Elizabeth of Poland and a Hungarian–Polish alliance was formed, which benefited both countries. It helped Hungary defeat the Holy Roman Empire and Austria in the war of 1322–1337, whereas in 1327 a diplomatic intervention of Charles I prevented a subjugation of Polish territories to King John of Bohemia, and Hungary aided Poland in the Polish–Teutonic War of 1326–1332. Louis the Great was king of Hungary and Croatia from 1342 and king of Poland from 1370 until his death in 1382. He was his father's heir, Charles I of the House of Anjou-Sicily (King of Hungary and Croatia) and his uncle's heir, Casimir III the Great (king of Poland – last of the Piast dynasty). King Casimir had no legitimate sons. Apparently, in order to provide a clear line of succession and avoid dynastic uncertainty, he arranged for his nephew, King Louis I of Hungary, to be his successor in Poland. Louis' younger daughter Saint Jadwiga of Poland inherited the Polish throne, and became one of the most popular monarchs of Poland.

Hungarians and Poles fought together against the Ottoman invasion of Europe at the Battle of Nicopolis in 1396 as part of a larger European coalition led by King Sigismund of Hungary. In 1440–1444, the two countries shared the same King again, after King Władysław III of Poland became also King of Hungary. He was eventually killed in the Battle of Varna in which a coalition of Central and Eastern European countries led by Poland and Hungary was defeated by the Turks. Poles fought on the side of Hungary in subsequent Ottoman–Hungarian wars, including the battles of Kosovo (1448) and Mohács (1526). From 1490 to 1526, both countries were ruled by separate but closely related branches of the Jagiellonian dynasty, after Polish prince Władysław, son of Polish King Casimir IV Jagiellon, became King Vladislaus II of Hungary. In 1576, Poland elected the Hungarian nobleman Stephen Báthory as its king, who is regarded as one of Poland's greatest rulers. The great Hungarian Renaissance poet Bálint Balassi spent parts of his life and wrote some of his poems in Poland. There are memorials to him at his places of stay in Odrzykoń, Nowy Żmigród, Rymanów, Dębno, Braniewo and Kraków. The famous Polish hussars were modelled after Hungarian hussars.

Hungarian and Polish fights for independence

Poles gave shelter to Hungarian insurgents and aided them during the Rákóczi's War of Independence against Austria. In 1701 Hungarian conspirators Miklós Bercsényi and Francis II Rákóczi fled to Poland, where they established contacts with the Polish Royal court and gained the support of several Polish magnates for the planned Hungarian uprising. In Poland, Bercsényi and Rákóczi received protection from the Austrians, who still tried to capture them through attempts of the Habsburg ambassador to Poland.Z Bogiem za ojczyznę i wolność – o Franciszku II Rakoczym bohaterze Węgier, p. 13 After the Hungarian uprising broke out in 1703, an insurgent delegation went to Poland to find Rákóczi and ask him to lead the uprising. A meeting of the then insurgent leader with Rákóczi and Bercsényi took place in May 1703 in Brzeżany, Poland, and it also was the place where Rákóczi and Bercsényi signed a proclamation, which called on Hungarians to fight for independence.Z Bogiem za ojczyznę i wolność – o Franciszku II Rakoczym bohaterze Węgier, p. 20 Rákóczi and Bercsényi then went to Hungary separately, each with Polish troops lent by Polish magnates. In September 1703, Polish King Augustus II the Strong in an official document to the port city of Gdańsk prohibited the purchase of weapons for the Hungarian insurgents, but at the same time he secretly assured Rákóczi of his friendship, and many weapons were supplied to the Hungarians through Gdańsk during the war.Z Bogiem za ojczyznę i wolność – o Franciszku II Rakoczym bohaterze Węgier, p. 36 The Hungarians maintained close contact with Poland, both through correspondence and their envoys, and also thanks to the numerous visits of Poles at Rákóczi's court in Szentmiklós in 1707–1710.Z Bogiem za ojczyznę i wolność – o Franciszku II Rakoczym bohaterze Węgier, pp. 21, 23

After the fall of the uprising in 1711, 3,000 Kurucs, including Rákóczi himself, took refuge in Poland.Z Bogiem za ojczyznę i wolność – o Franciszku II Rakoczym bohaterze Węgier, p. 15 Rákóczi then lived in Jarosław and Gdańsk before leaving Poland in 1712 for France, where he unsuccessfully sought support for Hungarian national liberation efforts.Z Bogiem za ojczyznę i wolność – o Franciszku II Rakoczym bohaterze Węgier, p. 11 A number of Hungarians remained in Poland, including painter Ádám Mányoki, who became a court painter of Polish Kings, and Ádám Jávorka, who became a general of the Polish Army.

There were cases of Hungarians, who in small groups or individually, made their way to the Russian Partition of Poland to help the Polish November Uprising of 1830–1831. The Hungarian counties voiced their support for the uprising. In 1832, after the fall of the uprising, the Hungarian parliament agreed with the position of the Hungarian counties on the uprising. The pro-Polish stance of the Hungarian parliament was exceptional among the predominantly indifferent European countries. After the uprising, the Polish National Committee formed in exile in Paris issued a proclamation to the Hungarian people, thanking them for their support, stating that "there was no nation which would more openly and boldly acknowledge the friendship and righteousness of our cause." Among the founding members of the committee was Charles Kraitsir, a Hungarian-born doctor decorated with the Order of Virtuti Militari for his services in the November Uprising, who spent the rest of his life as part of the Polish Great Emigration.Stasik, p. 116 Committee leader Joachim Lelewel saw him as a link between the committee and the Hungarian people.Stasik, p. 117 Kraitsir issued a proclamation to the Hungarian people, calling for help for the Polish emigration in Western Europe. This proclamation was smuggled into Austrian-ruled Hungary, and its distribution carried the risk of repression by the Austrians.

In the Hungarian Revolution of 1848, a Polish general, Józef Bem, became a national hero of both Hungary and Poland. He was entrusted with the defence of Transylvania at the end of 1848, and in 1849, as General of the Székely troops.Kálmán Deresnyi, General Bem's Winter Campaign in Transylvania, 1848-1849 (Hung.), (Budapest, 1896) On October 20, 1848 Józef Wysocki signed an agreement with the Hungarian government to form a Polish infantry battalion of about 1,200 soldiers. After the agreement, Wysocki organized the Polish Legion in Hungary, which contained 2,090 infantry soldiers and 400 Polish uhlans. They took part in the siege of the Arad fortress in the spring of 1849 and participated in all important battles at Szolnok, Hatvan, Tápióbicske and Isaszeg. After the Battle of Temesvár in August 1849, and the Hungarian capitulation at Világos, 800 of the remnants of the Legion escaped to Turkey.Józef Wysocki, "Pamiętnik Jenerała Wysockiego, dowódcy Legionu Polskiego na Węgrzech z czasu kampanii węgierskiej w roku 1848 i 1849" digital version of Wysocki memoirsE. Kozłowski, Legion polski na Węgrzech 1848–1849, Warszawa 1983

As part of the International Legion in Italy, both Hungarians and Poles led by István Türr and Ludwik Mierosławski fought alongside Giuseppe Garibaldi in the Expedition of the Thousand of 1860–1861, which paved the way for the creation of a united Kingdom of Italy in 1861. Afterwards, Poles and Hungarians in exile worked together to organize a large-scale uprising of Hungarians, Poles and Italians against Austria, while Poles and Hungarians in the Austrian Partition of Poland and Austrian-ruled Hungary cooperated to achieve political and cultural autonomy for their nations, including the right to use their native languages, and to hinder Austrian attempts to centralize power in Vienna. In Paris, György Klapka, Ludwik Mierosławski and Giuseppe Garibaldi decided that Hungarian and Italian revolutionaries would help in the event of a Polish uprising.

In 1861, the Austrian Emperor dissolved the Hungarian parliament because of its resistance to the Austrian plan of centralization of administration, and then the Austrians implemented their orders by force, and even declared a state of emergency in Hungary and threatened to repress resistant Hungarians. Polish politicians from Galicia (Austrian Partition of Poland) spoke out against such Austrian policies and defended the political and historical rights of the Hungarian people. , Polish deputy who delivered a splendid speech against the Austrian centralist plans and in defense of the rights of the Hungarians, received dozens of letters of thanks and honorary citizenships from Hungarian counties and towns. In response, Smolka thanked the Hungarian people in an open letter, assuring them of the friendship of the Polish nation and declaring to the Hungarians that "your cause is our cause, and our cause is your cause."

Several hundred Hungarian volunteers fought alongside Poles in the January Uprising in the Russian Partition of Poland in 1863–1864, forming a large group among the foreign volunteers. Among them were Major and Captain Albert Esterhazy, who died at the battles of Panasówka and Mełchów respectively. In Hungary, funds and weapons were collected by the people and sent to the Polish insurgents. After the fall of the uprising, about 4,000 Polish refugees were received in Hungary.