The marriage secured an alliance between Hungary and Naples: In 1480, when an Ottoman fleet seized Otranto in the Kingdom of Naples, at the earnest solicitation of the pope he sent the Hungarian general, Blaise Magyar, to recover the fortress, which surrendered to him on 10 May 1481. Again in 1488, Matthias took Ancona under his protection for a while, occupying it with a Hungarian garrison. Beatrice exerted some influence in the policy of Hungary. She also had a cultural importance by introducing the Italian renaissance into the court of Hungary, an interest she shared with Matthias: she encouraged his work with the Bibliotheca Corviniana, built the palace Visegrád as a residence for the court, and created an Academy. She wished to participate in policy: in 1477, she accompanied Matthias during the invasion of Austria, and in 1479, she was present during the peace treaty between Matthias and Vladislaus II.