Military career and reign
By the time of his accession to the throne, in 1223, Portugal was embroiled in a difficult diplomatic conflict with the Catholic Church. His father, Afonso II, had been excommunicated by Pope Honorius III, for his attempts at reducing the Church's power within the country. A treaty of 10 articles was signed between the Pope and Sancho II, but the king paid little attention to its fulfillment. His priority was the Reconquista, the reconquest of the southern Iberian Peninsula from the Moors. From 1236 onwards, Sancho II conquered several cities in the Algarve and Alentejo, securing the Portuguese position in the region.