Danish-Polish relations date back to the Middle Ages. Poland and Denmark entered into alliances in 1315 and 1350. Later on, during the Polish-Teutonic wars of 1409–1411 and 1454–1466, Denmark temporarily sided with the Teutonic Knights, however, there were very few Danish-Polish clashes. Between those wars, Eric of Pomerania of the House of Griffin became King of Denmark as Eric VII in 1412, and reigned until 1439. Denmark and Poland were allies during the Northern Seven Years' War, however, shortly after the war, in 1571, the Danish Navy conducted a naval raid of the Polish ports of Puck and Hel in the naval battle near Hel. Both countries were again allies in the Second Northern War and Great Northern War. Denmark, besides Spain, Turkey and Iran, objected to the Partitions of Poland in 1795.