Portugal was founded in 1143, year of the Zamora's Treaty signing. The treaty, agreed upon by D. Afonso Henriques, the first King of Portugal, and Alphonse the VII of León and Castile, recognized Portugal as an independent kingdom. In 1179 that status was confirmed by Pope Alexander the III.