sentences:  In 1371 King Ferdinand I suffered a defeat when he invaded Galicia; one of the stipulations of the Treaty of Alcoutim was his marriage to Infanta Eleanor, daughter of King Henry II of Castile.Any of these marriages would have pleased the Portuguese people, although the last one, according to the stipulations in the Treaty of Alcoutim, could imply "a threat to the sovereignty of the Portuguese Kingdom".Ferdinand I broke his betrothal to the Castilian infanta
   and on 5 May 1372, the official wedding was celebrated away from the court in the small town of Leça do Balio.