The truce was broken with the Battle of Golpejera on 12 January 1072. Although Sancho II's troops were victorious, he decided not to persecute his brother Alfonso, who was imprisoned in Burgos and later transferred to the monastery of Sahagún, where his head was shaved and he was forced to wear a chasuble. Thanks to the intercession of their sister Urraca, Sancho and Alfonso reached an agreement under which Alfonso VI was able to take refuge in the Taifa of Toledo under the protection of his vassal Al-Mamun, accompanied by his childhood friend, the faithful Pedro Ansúrez and his two brothers Gonzalo and Fernando.