Founded in 868, the country of Portugal gained importance after the Battle of São Mamede (1128). The Kingdom of Portugal was proclaimed after the Battle of Ourique in 1139, and independence from the Kingdom of León was recognized by the Treaty of Zamora in 1143.