During the regency, his uncle
Sancho VI of Navarre took advantage of the chaos and the king's minority to seize lands along the border, including much of
La Rioja. In 1170, Alfonso sent an embassy to
Bordeaux to
Henry II of England and
Eleanor of Aquitaine to seek the hand of their daughter
Eleanor. The marriage treaty helped provide Alfonso with a powerful ally against his uncle. In 1176, Alfonso asked his father-in-law to arbitrate the disputed border territories. While Alfonso received back much that had been taken from him, he had to pay significant monetary compensation. In 1186, he recovered part of
La Rioja from the
Kingdom of Navarre. In 1187, Alfonso negotiated with
Frederick I, Holy Roman Emperor, who was seeking to marry his son
Conrad to Alfonso's eldest child and heiress,
Berengaria. In April 1188, they agreed on a treaty in
Seligenstadt, which made clear that she was the heiress of Castile after any sons of Alfonso and that Conrad would only co-rule as her spouse. That became relevant in her ultimate succession to the throne even though the marriage to Conrad was never consummated and later annulled. The treaty also documented traditional rights and obligations between the sovereign and the nobles in Castile. In July 1188, Alfonso convened his court in
Carrión de los Condes to allow the nobles to review and ratify the treaty. At that court, Alfonso knighted both Conrad and
Alfonso IX of León, who would ultimately marry Berengaria. The younger Alfonso had come to seek the support and acknowledgement of his ascent to the throne of León from his older cousin. The elder Alfonso granted that in exchange for acknowledgement that the king of Castile was overlord of the king of León. The relationship between the cousins Alfonso continued to be filled with conflict. In 1194, the papal legate negotiated a treaty between them to temporarily end the conflict. However, after Castile was defeated at the
Battle of Alarcos, the younger Alfonso seized the opportunity
to again attack his cousin. Castille defended itself with papal support. A more lasting peace was achieved finally by the older Alfonso's daughter Berengaria marrying the younger Alfonso in 1197. The annulment of this marriage by the pope drove the younger Alfonso to again attack his cousin in 1204, but treaties made in 1205, 1207, and 1209 each forced him to concede further territories and rights. The treaty in 1207 is the first existing public document in the
Castilian dialect. Around 1200 when his brother in law
John was on the English throne, Alfonso began to claim that
Gascony was part of Eleanor's dowry, though there was nothing in the marriage treaty to indicate this. In 1205,
he invaded Gascony, hoping to make good on his claim. By 1208, he gave up on the venture, though his heirs would come back to this claim generations later. ==Reconquista==