 In 1638, 1643 and 1645, the city of Vienna was threatened by Swedish troops.After the devastating defeat at the Battle of Jankau on March 6, 1645, it became apparent that the emperor was practically defenseless.The Habsburgs could no longer win the war without the support of the Spanish allies.