But on 9 June 1448, when the king came of age, Peter had to surrender his power to Afonso V. The years of conspiracy by the Duke of Braganza finally came to a head. On 15 September of the same year, Afonso V nullified all the laws and edicts approved under the regency. In the following year, led by what were later discovered to be false accusations, Afonso declared Peter a rebel and defeated his army in the Battle of Alfarrobeira, in which his uncle (and father-in-law) was killed. After this battle and the loss of one of Portugal's most remarkable infantes, the Duke of Braganza became the "de facto" ruler of the country.