Complex sentence: During the Ottoman occupation of Hungary the Ottomans invaded the area twice, first in 1664, when they were defeated at the nearby town Szentgotthárd, and again in 1683, during the Battle of Vienna.
Split into simpler sentences: During the Ottoman occupation of Hungary, the Ottomans invaded the area twice, first in 1664, when they were defeated at the nearby town of Szentgotthárd. Nearly twenty years later, they invaded again in 1683, during the Battle of Vienna.