Sigismund's position was solidified when Zamoyski defeated Maximilian at the Battle of Byczyna and took him prisoner. At the request of Pope Sixtus V, the Archduke was then released and in turn surrendered his claim to Poland in 1589. He was also successful in maintaining peace with his powerful southern neighbour by marrying Archduchess Anne of Habsburg in 1592. Simultaneously, he secured an alliance with Catholic Austria against Protestant foes.