Formal connections between England and Portugal go back to the twelfth century. In 1147, a fleet left England to take part in the Second Crusade but ended up helping Afonso Henriques take control of Lisbon from the Moors after stopping at Oporto. Their cooperation was formalised following the Portuguese defeat of Castile with the aid of England at the Battle of Aljubarrota and the Windsor Treaty (1386). One year later, the marriage of João I and Phillipa de Lancaster consolidated the first Anglo-Portuguese marriage. Henry the Navigator, one of the greatest names in the Portuguese overseas expansion, was the product of their union.