 In May 1107, Alfonso imposed the recognition of Sancho as heir, despite the probable opposition of his daughters and sons-in-law, in the course of a "Curia Regia" held in León.The situation improved for the king with the death of Raymond of Burgundy in September and the agreement with Urraca so that she remained as sovereign Lady of Galicia, except in the case of remarrying since, in that case, Galicia would pass to her son.The death of Sancho in the Battle of Uclés on 29 May 1108 left Alfonso VI without his only male heir.