Peter died on 2 November 1285, in the same year as his two royal foes, Charles and Philip. His deathbed absolution occurred after he declared that his conquests had been in the name of his familial claims and never against the claims of the church. After a few more years of general warfare, marked by the Battle of the Counts on 23 June 1287, where the Angevins were defeated near Naples, the Treaty of Tarascon of 1291 officially restored Aragon to his heir, Alfonso, and lifted the ban of the church.