Two separate failed sieges of Vienna checked Turkish expanson: 1539 and 1683. The last one was the signal of the end of the Ottoman menace to eastern Europe. The encircling army was surprised by a relieving force. A sally by the city's defenders complicated the problem and the beseiging force disintegrated.
Within a few decades, Peter the Great was expanding against Turkey and western powers like England were trying to find ways to prop them up as a buffer against Russia.