The Iberian Peninsula was occupied by combined Arab-Berber forces in 711, and Portugal was under Muslim rule until 1139, after an overwhelming victory in the Battle of Ourique Afonso Henriques was proclaimed the first King of Portugal. The Reconquista was completed on Portuguese territory in 1249 with the capture of the Algarve. Since this time Portugal was a Roman Catholic realm, the Kingdom of Portugal. During the 15th and 16th century, Portuguese exploration established a vast colonial empire. From 1834 Portugal was a constitutional monarchy. In 1910 it was reüplaced by the modern Portuguese Republic.