At the end of the 12th century, a series of pacts between the crowns of Aragon and Castile delimited the zones that the two would each attempt to conquer from Muslim-ruled kingdoms, (the ""Reconquista""); to the east, in 1213, the defeat and death of Peter II of Aragon ("Peter the Catholic") in the Battle of Muret put an end to the project of consolidating the Aragonese influence and power over Provence and the County of Toulouse. His successor James I of Aragon did not fully consolidate his power until 1227; once he consolidated his inherited realm, he began a series of new conquests. Over the course of the next quarter-century he conquered Majorca and Valencia.