Treaty of Tuy

The Treaty of Tuy (Tratado de Tuy; Tratado de Tui) was a treaty signed in Tuy, the Kingdom of León, in 1137 between the Count of Portugal, Afonso Henriques, and the King of León, Alfonso VII the Emperor. It put an end to the Portuguese-Leonese War of 1130-1137.

Afonso Henriques, knowing that Alfonso VII was occupied with the conflict with the King of Navarre, took advantage of this opportunity to invade Galicia with his army, taking Tuy, seizing some castles by betrayal and causing damage in the area. Later Alfonso VII was able to recover Tuy.

The peace treaty was signed and witnessed by Paio Mendes, the Archbishop of Braga and the Primate of Portugal, for the Portuguese, and the bishops of Segovia, Tuy and Ourense for the Leonese side. The terms of the treaty were as follows: The treaty was ratified by both parties in the presence of 150 witnesses.
 * Afonso swears to be a faithful friend of Emperor Alfonso VII;
 * The person of the emperor is recognized as inviolable; security is guaranteed to him, as well as to his possessions, his vassals and their lands;
 * Portugal is obliged to provide military assistance to the emperor during wars with Muslim and Christian rulers;
 * Afonso must reimburse the emperor if the Portuguese barons violate the treaty;
 * Gifts of land (honras), which Afonso received from the emperor, should be returned immediately and unconditionally at the request of the emperor or his heir;

The text of the agreement has not been preserved, its summary description contained only in the Historia Compostelana. It was written in illiterate Latin, by a third person, with the signatures of five prelates but without mentioning the names of those who had certified it. On this basis a Portuguese historian Gonzaga de Azevedo suggested that the treaty was a medieval forgery, and Afonso himself never signed it. It is said that when Archbishop Paio Mendes, who was in Tuy and signed the agreement, acquainted the Portuguese count Afonso with its terms, he refused to abide by them. However, because the negotiations had been concluded, Alfonso VII of León considered the military conflict resolved.

The treaty did not oblige Afonso to directly declare himself a vassal of the emperor, but subordinated him to the Leonese crown in matters of land ownership. Some authors consider that Afonso avoided any act that would mean his submission to Alfonso VII. Thus, he never recognized Alfonso VII as emperor, and Alfonso VII never invoked his imperial title in relations with the County of Portugal. However, the king of León and Castile never renounced his claim to overlordship, as shown by the protest he directed to Pope Eugene III on the occasion of the Council of Reims (1148) as well as Alfonso VII's tenacity with which he fought until the end of his life for the ecclesiastical primacy of Toledo over all the Hispanic territories.

Afonso of Portugal violated the treaty in 1139, again invading Galicia.