Afonso's campaigns were successful and, on 25 July 1139, he obtained an overwhelming victory in the Battle of Ourique, and straight after was unanimously proclaimed King of Portugal by his soldiers. This is traditionally taken as the occasion when the County of Portugal, as a fief of the Kingdom of León, was transformed into the independent Kingdom of Portugal.