His parents won the war against the King and Queen of Portugal. To negotiate a peace settlement with Isabella, King Afonso sent Infanta Beatrice, Duchess of Viseu. The two women met in March 1479. Beatrice was Afonso's sister-in-law and Isabella's maternal aunt. By terms of the treaty they eventually negotiated, the former Queen of Portugal (her marriage having been annulled by the Pope) was given two options: she could either wed Prince John, waiting 13 or 14 years until the prince was old enough to be married (by which time Joanna herself would be at least thirty) or she could enter a convent; either way she was to give up her claim to the throne.