After winning the Battle of Ourique, Afonso I became King of Portugal.

Source