Санчо III
In 1157 his father, King Alfonso VII died, and according of his will and the previous dispositions of the council of Valladolid of 1155, his second son inherited the Kingdoms of León and Galicia under the name of Ferdinand II; during the early months of his reign, the new monarch had to resolve his disputes with the powerful local nobles and an invasion by his brother Sancho III of Castile. In 1158 Ferdinand II signed the Treaty of Sahagún with his brother Sancho III, under which they agreed to jointly wage war against the Muslims, to divide up the conquered territories, the provision that in case one of the two brothers died without issue, the survivor would inherit the domains of the deceased brother, and the partition of the Kingdom of Portugal. The death of his brother Sancho III in the same year and the succession of his infant son Alfonso VIII, annulled the clauses of the Treaty of Sahagún.