The Treaty of Sangüesa between Alfonso II of Aragon and Sancho VI of Navarre was signed on 19 December 1168 at the church of San Adrián de Vadoluengo in Sangüesa on the Navarrese side of the river Aragón. It provided for a twenty-year truce and an alliance against Muhammad ibn Mardanis, King of Murcia. Alfonso and Sancho agreed to divide between them the Murcian territory they conquered. They also pledged safe conduct to each other in their kingdoms. At the meeting at Sangüesa, Sancho VI brought with him two legal experts, Pedro Jiménez de Góngora and Lope Íñiguez de Urroz, and the terms he obtained were very favourable to his smaller kingdom.
In October 1167 Sancho VI had signed a ten-year truce with Alfonso VIII of Castile, with the implication that he would aid the king of Murcia to attack Alfonso of Aragon. The treaty of 1168 annulled this. In 1169, under attack from Aragon, the king of Murcia requested aid from the king of Castile. In exchange, Muhammad ceded the castles of Vilches and Alcaraz to Alfonso VIII. In 1170, the kings of Aragon and Castile then reached agreement, the Treaty of Sahagún, whereby the former would cease his attacks on Murcia in exchange for an annual tribute of 40,000 morabetinos from the Muslim king.
According to a theory of José María Lacarra, the semi-independent lordship of Albarracín was created out of territory Navarre gained at the expense of Murcia as a result of this treaty. Martín Almagro Basch rejects this theory, contending that Albarracín was granted by the king of Murcia to the Navarrese nobleman Pedro Ruiz de Azagra in order to sow discord between Aragon and Castile.
In the name of the Lord. This is the covenant which has been made between Sancho, king of Navarre, and Alfonso, king of Aragon. For both agree with one another, that henceforth from this day they may have a firm peace and truce, in good faith without fraud and evil intent, lasting 20 years, for them and their heirs if they should happen to die within this time, which God forbid. The same way also they come together by good faith, without lying, that no matter what from this day henceforth what they can take, or acquire, throughout all the land of King Lupus, or in all other lands of the Saracens, they will divide in half and hold thus, both the wilderness and the populated areas, except that land which the vassals of the king of Aragon held, in Gudar and in Campo de Monte Acuto, about which a diligent inquisition was made, and except in Perol, with its boundaries, without lying.
They firmly agree, too, that they will both make war on King Lupus and the other Saracens, each according to his power, and they faithfully help in this in good faith without evil intent.If, however, it happens that one of the kings dies within the aforesaid time, the one who survives him is his heir in this covenant [i.e., inherits his spoils]. In like manner, if it shall happen that they make peace with King Lupus, or with the other Saracens, they will divided in half the money and tribute that they receive from this. And in this acquisition, whatever happens in the war, between them and their heirs they will always have peace without fraud. But the aforementioned acquisition that they shall make in the land of the Saracens, as has been said, they shall faithfully divide no matter how they acquired it, whether by themselves or through their men. All these things which are written above I, Sancho, king of Navarre, do swear, and I, Alfonso, king of Aragon, do likewise swear, and we make our men to swear to lovingly attend to it. And if one of us kings breaks the aforementioned covenants, there shall be a traitor and betrayer.
I, Sancho, king of Navarre, do grant and cede to you, Don Alfonso, king of Aragon, surety by good faith and without evil intent, and under an oath I assume [responsibility] that as often as you are willing to enter into my land, or from there to go out, or to stay there, you may be secure from any hindrance from me or any of my men. And I, Alfonso, king of Aragon, in the same way, do give and concede to you Don Sancho, king of Navarre, surety by good faith and without evil intent, and under an oath to assume that as often as you are willing to enter in to mine own country, or from there to go out, or stay there, you may be secure from all a hindrance to me, and all my men.
[<small>''In nomine Domini. Hec est conveniencia que facta est inter Sancium, regem Navarra, et inter Aldefonsum, regem Aragone. Conveniunt namque sibi ad invicem, quod ab hac die in antea habeant firman pacem et treguas, per bonam fidem sine fraude et malo ingenio, usque ad XX. annos, ipsi et heredes eorum si eos infra hoc tempus mori contingat, quod Deus avertat. Simili quoque modo sibi ad invicem conveniunt per bonam fidem, sine engano, quod quidquid ab hac die in antea potuerint capere, vel adquirere in tota terra regis Lupi, vel tota alia terra sarracenorum, per medium divident et habebunt in heremo et populato, excepto illa terra quam tenuerunt homines regis Aragone, in Gudar, et in Campo de Monte Acuto, facta super hoc diligente inquisicione et excepto Perol, cum suis terminis, sine enganno.<br>Conveniunt etiam sibi ad invicem firmiter quod faciant ambo guerram regi Lupo et aliis sarracenis secundum suum posse, et adiuvent se fideliter de hoc per bonam fidem sine malo ingenio. Si vero contigerit alterum ex regibus mori infra predictum tempus, ille qui superstes fuerit, sit heredi alterius in eadem conveniencia. Similiter si contigerit quod pacem faciant cum rege Lupo, vel cum aliis sarracenis, dividant per medium pecuniam, et tributum quod inde habebunt. Et in ista adquisicione qualecumque guerra fuerit, inter eos vel eorum heredes, semper habeant pacem sine fraude. Supradictam autem adquisicionem quam facient in terra sarracenorum, ut dictum est, fi deliter divident quocumque modo adquirant per se vel per suos homines. Hec omnia que suprascripta sunt iuro ego Sanctus, rex Navarre, et ego Aldefonsus, rex Aragone, iuro similiter, et facimus iurare nosotros homines ita tenero et atendere. Et siquis nostrum scilicet regue, supradictas conveniencias infregerit, habeatur proditor et alevosus.<br>Dono et concedo ego Sancius, rex Navarre, vobis domino Aldefnso regi Aragone, securitatem per fidem bonam sine malo ingenio, et sub iuramento pono quod quociens volueritis intrare in terram meam vel inde exire aut ibi morari, sitis securus ab ovni impedimento mei et omnium meorum hominum. Et ego Aldefonsus rex Aragone, simili modo, dono et concedo vobis domino Sancio, regi Navarre, securitatem per fidem bonam sine malo ingenio, et sub iuramento pono quod quociens volueritis intrare in terram meam, vel inde exire aut ibi morari, sitis securus ab ovni impedimento mei et omnium meorum hominum (…)''</small>{{sfn|González Cavero|2007|pp=108–09}}]