The Ottomans fought on for another 16 years, losing control of Hungary and Transylvania in the process before finally desisting. The Holy Roman Empire signed the Treaty of Karlowitz with the Ottoman Empire in 1699. The battle marked the historic end of Ottoman imperial expansion into Europe.