By 1580, Spain was occupied with integrating Portugal, and suppressing the Dutch Revolt, while the Ottomans were at war with Persia; the two sides agreed a truce, leading to an improvement of relations. After almost five years, and four escape attempts, in 1580 Cervantes was set free by the Trinitarians, a religious charity that specialised in ransoming Christian captives, and returned to Madrid.
