After the Turkish disaster at Vienna in September 1683, Austria and Poland formed an alliance to push the Turks south ). In 1686 Russia joined in ). After the Turks were pushed out of Hungary in 1687 fighting was inconclusive. In the Crimean campaigns of 1687 and 1689 the Russians failed in an attempt to invade Crimea. In 1695 Russia tried to take some forts on the lower Dnieper. By the treaties of 1699/1700 Turkey lost Hungary to Austria, Podolia to Poland and Azov, temporarily, to Russia.

Answer this question based on the article: Which happened last, Turkey losing Hungary to Austria, or the Russians failing to invade Crimea for the second time?
Turkey lost Hungary to Austria