Afonso then established the first of the Portuguese Cortes at Lamego, where he was crowned by the Archbishop of Braga, though the validity of the Cortes of Lamego has been disputed and called a myth created during the Portuguese Restoration War. Afonso was recognized in 1143 by King Alfonso VII of León, and in 1179 by Pope Alexander III.