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.