Treaty of Karlowitz
The most traumatic event of his reign was the loss of Hungary by the Treaty of Karlowitz in 1699.