This chapter examines the political processes that led the Master of the Military Order of Avis, the bastard son of King Pedro I of Portugal, to the throne of Portugal when there was already a legitimate heir, his niece Beatriz, daughter of the late King Fernando. The Master of Avis was acclaimed king at the Cortes of Coimbra of 1385, through an election that effectively legitimised a coup d’état. To understand how it came to this point, this chapter analyses Beatriz’s inheritance rights during her father’s reign and the rise of the Master of Avis during the regency of Beatriz’s mother, the dowager queen Leonor Teles. This is done in comparison to the roughly contemporaneous rise of the Trastámara dynasty in Castile which also began by a coup d’état. This comparison is contextualised by examining the origins of royal power in the Iberian kingdoms as presented through ancient and medieval sources such as Aristotle, Fuero Juzgo, Las Siete Partidas, Speculum Regum, and the contemporary political writings of the Portuguese chronicler Fernão Lopes and the Castilian chronicler Pero López de Ayala.