Treaty of Karlowitz gives Austria almost all of Hungary
A peace congress met in 1698 at the village of Carlowitz, now Sremski Karlovci in Serbia. On 26 January 1699 the Ottoman Empire signed peace treaties there with Austria, Poland and Venice.
Austria received all of Hungary except the Banat of Temesvár, along with Transylvania, Croatia and Slovenia, Britannica says.