{{Infobox Monarch
| name =Afonso IV
| title =King of Portugal<br><small>and the Algarve</small>
| image =[[Image:AfonsoIV-P.jpg|200px|Afonso IV of Portugal]]
| caption =<small>17th century painting of Afonso IV.</small>
| reign =[[January 7]], [[1325]]&mdash;[[May 28]], [[1357]]
| othertitles =Infante of Portugal <small>([[1291]]&ndash;1325)</small>
| full name =Afonso of Portugal
| predecessor =[[Denis of Portugal]]
| successor =[[Peter I of Portugal]]
| suc-type =Heir
| heir =[[Peter I of Portugal|Infante Pedro <small>(future Peter I)]] <small>(1325&ndash;1357)
| queen =[[Beatrice of Castile (1293-1359)|Infanta Beatriz of Castile]]
| issue =[[Maria of Portugal|Infanta Maria, Queen of Castile]] <small>([[1313]]&ndash;[[1237]])</small><br>[[Infante Afonso of Portugal (1315)|Infante Afonso]] <small>([[1315]])</small><br>[[Infante Dinis of Portugal|Infante Dinis]] <small>(1317&ndash;[[1318]])</small><br>[[Peter I of Portugal|Infante Pedro <small>(future Peter I)]] <small>([[1320]]&ndash;[[1367]])</small><br>[[Infanta Isabel of Portugal (1324)|Infanta Isabel]] <small>([[1324]]&ndash;[[1326]])</small><br>[[Infante João of Portugal|Infante João]] <small>(1326&ndash;[[1327]])</small><br>[[Leonor of Portugal, Queen of Aragon|Infanta Leonor, Queen of Aragon]] <small>([[1328]]&ndash;[[1348]])</small>
| royal house
=[[House of Capet|Capetian]] [[House of Burgundy]]
| dynasty =[[House of Burgundy|Affonsine Dynasty]]
| father =[[Denis of Portugal]]
| mother =[[Elizabeth of Aragon]]
| date of birth =[[February 8]], [[1291]]
| place of birth
={{flagicon|Portugal|1248}} [[Lisbon]], [[Kingdom of Portugal]]
| date of death =May
28, 1357
| place of death
={{flagicon|Portugal|1248}} Lisbon, Kingdom of Portugal
| place of burial =[[Lisbon Cathedral|Lisbon See Cathedral]], [[Lisbon]], [[Lisbon (district)|District of Lisbon]], [[Portugal]]
|}}
{{House of Burgundy}}
'''Afonso IV
'''<ref>[[English language|English]] ''Alphonzo'' or ''Alphonse''), or ''Affonso'' (Archaic Portuguese), ''Alfonso'' or ''Alphonso'' ([[Portuguese-Galician languages|Portuguese-Galician]]) or ''Alphonsus'' ([[Latin]]).</ref> ({{pronounced|ɐˈfõsu}}; [[8 February]] [[1291]] &ndash; [[28 May]] [[1357]]), called '''the Brave'''([[Portuguese language|Portuguese]]: ''o Bravo''), was the seventh [[List of Portuguese monarchs|king of Portugal and the Algarve]] from [[1325]] until his death. He was the only legitimate son of [[Dinis of Portugal]] by his wife [[Elizabeth of Aragon]].

Afonso, born in [[Lisbon]], was his father's only legitimate son and the rightful heir to the Portuguese throne. However, he was not, according to several sources, Dinis' favourite son; his half-brother, the illegitimate [[Afonso Sanches]], enjoyed full royal favour. From early in life, the notorious rivalry led to several outbreaks of [[civil war]]. On [[January 7]], [[1325]], Afonso's father died and he became king, taking full revenge on his brother. His rival was sentenced to [[exile]] in [[Crown of Castile|Castile]], and stripped of all the lands and [[fiefdom]]s donated by their common father. Afonso Sanches, however, did not sit still. From Castile, he orchestrated a series of attempts to usurp the crown for himself. After a few failed attempts at invasion, both brothers signed a peace treaty, arranged by the Afonso's mother Queen Elizabeth.

In [[1309]], Afonso IV married Infanta [[Beatrice of Castile (1293-1359)|Beatrice of Castile]], daughter of King [[Sancho IV of Castile]] by his wife [[Maria de Molina]]. The first-born of this union, Infanta [[Maria of Portugal]], married King [[Alfonso XI of Castile]] in [[1328]], at the same time that Afonso IV's heir, [[Peter I of Portugal]], was promised to another Castilian infanta, [[Constance of Penafiel]]. These arrangements were imperiled by the ill will of Alfonso XI of Castile, who was, at the time, publicly mistreating his wife. Afonso IV was not happy to see his daughter abused, and started a war against Castile. Peace arrived four years later, with the intervention of Infanta Maria herself. A peace treaty was signed in [[Seville]] in [[1339]] and, in the next year, Portuguese troops played an important role in the victory of the [[Battle of Rio Salado]] over the Marinid [[Moors]] in October [[1340]].

The last part of Afonso IV's reign is marked not by open warfare against Castile, but by political intrigue. Civil war between King [[Pedro of Castile]] and his half-brother [[Henry of Trastamara]] led to the exile of many Castilian [[nobility|nobles]] to [[Portugal]]. These immigrants immediately created a faction among the Portuguese court, aiming at privileges and power that, somehow, could compensate what they lost at home. The faction grew in power, especially after [[Ines de Castro]], daughter of an important nobleman and maid of the [[Constance of Penafiel|Crown Princess Constance]], became the lover of her lady's husband: [[Peter I of Portugal|Peter]], the heir of Portugal. Afonso IV was displeased with his son's choice of lovers, and hoped that the relationship would be a futile one. Unfortunately for internal politics, it was not. Peter was openly in love with Ines, recognized all the children she bore, and, worst of all, favoured the Castilians that surrounded her. Moreover, after his wife's death in [[1349]], Peter refused the idea of marrying anyone other than Ines herself.

The situation
became worse as the years passed and the aging Afonso lost control over his court. Peter's only male heir, future king [[Fernando of Portugal]], was a sickly child, while the illegitimate children sired with Ines thrived. Worried about his legitimate grandson's life, and the growing power of Castile within Portugal's borders, Afonso ordered the murder of [[Ines de Castro]] in [[1355]]. He expected his son to give in, but the heir was not able to forgive him for the act. Enraged at the barbaric act, Peter put himself at the head of an army and devastated the country between the [[Douro]] and the [[Minho]] rivers before he was reconciled to his father in early [[1357]]. Afonso died almost immediately after, in Lisbon in May.

As king, Afonso IV is remembered as a soldier and a valiant general, hence the nickname ''the Brave''. But perhaps his most important contribution was the importance he gave to the Portuguese [[navy]]. Afonso IV granted public funding to raise a proper [[trade|commercial]] fleet and ordered the first maritime explorations. The [[Canary Islands]] (today a part of [[Spain]]) were discovered during his reign.

==Ancestors==
{| class="wikitable"
|+'''Afonso's ancestors in three generations'''
|-
|-
| rowspan="8" align="center"| '''Afonso IV of Portugal'''
| rowspan="4" align="center"| '''Father:'''<br>[[Denis of Portugal]]
| rowspan="2" align="center"| '''Father's father:'''<br>[[Afonso III of Portugal]]
| align="center"| '''Father's father's father:'''<br>[[Afonso II of Portugal]]
|-
| align="center"| '''Father's father's mother:'''<br>[[Urraca, princess of Castile|Urraca of Castile]]
|-
| rowspan="2" align="center"| '''Father's mother:'''<br>[[Beatrix of Castile]]
| align="center"| '''Father's mother's father:'''<br>[[Alfonso X of Castile]]
|-
| align="center"| '''Father's mother's mother:'''<br>[[Maria de Guzmán]]
|-
| rowspan="4" align="center"| '''Mother:'''<br>[[Elizabeth of Aragon]]
| rowspan="2" align="center"| '''Mother's father:'''<br>[[Peter III of Aragon]]
| align="center"| '''Mother's father's father:'''<br>[[James I of Aragon]]
|-
| align="center"| '''Mother's father's mother:'''<br>[[Violant of Hungary]]
|-
| rowspan="2" align="center"| '''Mother's mother:'''<br>[[Constance of Sicily
(Queen of Aragon)|Constance of Sicily]]
| align="center"| '''Mother's mother's father:'''<br>[[Manfred of Sicily]]
|-
| align="center"| '''Mother's mother's mother:'''<br>[[Beatrice of Savoy (Queen of Sicily)|Beatrice of Savoy]]
|}

==Marriage and
descendants==
Afonso married [[Beatrice of Castile (1293-1359)|Beatrice of Castile]] ([[1293]]-[[1359]]) in [[1309]], daughter of [[Sancho IV of Castile|Sancho IV]], [[King of Castile]], and Maria de Molia and had four sons and three daughters.

{| class="wikitable"
|-
!Name!!Birth!!Death!!Notes
|-
|colspan=4|'''By
[[Beatrice of Castile (1293-1359)|Beatrice of Castile]]''' ([[1293]]-[[1359]]; married in [[1309]])
|-
|[[Maria of Portugal (1313-1357)|Infanta Maria]]||[[1313]]||[[1357]]||Queen of Castile by marriage to [[Alfonso XI of Castile]].
|-
|Infante Afonso||[[1315]]||[[1315]]||&nbsp;
|-
|Infante Dinis (Denis)||[[1317]]||[[1318]]||&nbsp;
|-
|[[Peter I of Portugal|Infante Pedro]]||[[April 8]] [[1320]]||[[January 18]] [[1367]]||Succeeded him as Peter I, 8th [[King of Portugal]].
|-
|Infanta Isabel||[[December 21]] [[1324]]||[[July 11]] [[1326]]||&nbsp;
|-
|Infante João (John)||[[September 23]] [[1326]]||[[June 21]] [[1327]]||&nbsp;
|-
|[[Leonor of Portugal (1328-1348)|Infanta Leonor (Eleanor)]]||[[1328]]||[[1348]]||Queen of Aragon by marriage to [[Peter IV of Aragon|Peter IV]], [[King of Aragon]].
|-
|colspan=4|'''Illegitimate offspring'''
|-
|[[Maria Afonso]]||[[1316]]||[[1384]]||Natural daughter
.
|}

==Notes==
{{reflist
}}

{{s-start}}
{{s
-hou|[[House of Burgundy]]|8 February|1291|28 May|1357|[[Capetian dynasty]]}}
{{s-reg}}
{{s
-bef|before=[[Denis of Portugal|Denis]]}}
{{s-ttl|title=[[List of Portuguese monarchs|King of Portugal]] and the [[Algarve|Algarves]]|years=1325 &ndash; 1357}}
{{s-aft|after=[[Peter I of Portugal|Peter I]]}}
{{end}}
{{Monarchs of Portugal}}

{{1911}}

[[Category:Portuguese monarchs]]
[[Category:House of Burgundy-Portugal]]
[[Category:1291 births|Afonso IV of Portugal]]
[[Category:1357 deaths|Afonso IV of Portugal
]]

[[ca:Alfons IV de Portugal]]
[[de:Alfons IV. (Portugal)]]
[[es:Alfonso IV de Portugal]]
[[fr:Alphonse IV de Portugal]]
[[it:Alfonso IV del Portogallo]]
[[nl:Alfons IV van Portugal
]]
[[ja:アフォンソ4世 (ポルトガル王)]]
[[pl:Alfons IV (król Portugalii)]]
[[pt:Afonso IV de Portugal]]
[[ro:Afonso al IV-lea al Portugaliei]]
[[fi:Alfons IV (Portugali)]]
[[zh:阿方索四世 (葡萄牙)]]