By mid-June, the Bohemian army under Thurn was outside Vienna; Mansfeld's defeat by Spanish-Imperial forces at Sablat forced him to return to Prague, but Ferdinand's position continued to worsen. Gabriel Bethlen, Calvinist Prince of Transylvania, invaded Hungary with Ottoman support, although the Habsburgs persuaded them to avoid direct involvement; this was helped when the Ottomans went to war with Poland in 1620, then Persia in 1623.