Portugal was one of the first countries in Europe to consolidate a strong government, centered on the person of the king. The formation of the Portuguese Monarchy began in the struggles for the expulsion of the Arabs who, since the eighth century, occupied the Iberian Peninsula. These fights became known as wars of Regain.
During Arab rule, Christian peoples were restricted to the north of the peninsula. From the eleventh century, little by little they managed to expand their territory. Several kingdoms were founded, including Aragon, Navarre, Lion, Castile. With that the Muslims began to retreat toward the south coast.
During the wars of Reconquista, stood out the noble Henry of Burgundy. As a reward, he received from the king of Leon and Castile, Alfonso VI, the hand of his daughter and the lands of the county of Porto.
The son of Henry of Burgundy, Afonso Henriques, then proclaimed himself king of Portugal in 1139, breaking ties with Leon and Castile. Thus began the Burgundy dynasty. Afonso Henriques the Conqueror extended his domains south to the Tagus River, and made Lisbon his capital.
In 1383, with the death of the last king of the Burgundy dynasty, Fernando, the Formoso, the Portuguese Crown was threatened with annexation by the rulers of Leon and Castile, relatives of the dead king. The Portuguese did not want their country to be ruled by a foreign king. The bourgeoisie, for its part, feared to see its commercial interests damaged by the Castilian nobles.
To prevent the loss of independence, the Portuguese hailed D.João, half-brother of the dead king, as new king. John, master of the city of Avis, defeated the Spaniards and took the throne. The financial support of the bourgeoisie was decisive in this victory. Thus, throughout the Avis dynasty, kings favored and supported bourgeois activities.