{{Infobox royalty
| name = Afonso VI
| image = AfonsoVIpt.jpg
| image_size =
| caption = Portrait, 17th century
| succession = King of Portugal
| reign = 6 November 1656 – 12 September 1683
| cor-type = Acclamation
| coronation = 15 November 1657
| predecessor = John IV
| successor = Peter II
| reg-type = Regents
| regent = Luisa de Guzmán(1656–1662)Peter, Duke of Beja(1668–1683)
| reg-type1 =
| regent1 = Count of Castelo Melhor(1662–1667)
| spouse =
| house = Braganza
| father = John IV of Portugal
| mother = Luisa de Guzmán
| birth_date = 21 August 1643
| birth_place = Ribeira Palace, Lisbon, Portugal
| death_date = 12 September 1683 (aged 40)
| death_place = Sintra Palace, Sintra, Portugal
| burial_place = Pantheon of the Braganzas
| religion = Roman Catholicism
}}
Dom Afonso VI (; 21 August 164312 September 1683), known as "the Victorious" (), was the second king of Portugal of the House of Braganza from 1656 until his death. He was initially under the regency of his mother, Luisa de Guzmán, until 1662, when he removed her to a convent and took power with the help of his favourite, D. Luís de Vasconcelos e Sousa, 3rd Count of Castelo Melhor.
Afonso's reign saw the end of the Restoration War (1640–68) and Spain's recognition of Portugal's independence. He also negotiated a French alliance through his marriage. In 1668, his brother Pedro II conspired to have him declared incapable of ruling, and took supreme de facto power as regent, although nominally Afonso was still sovereign. Queen Maria Francisca, Afonso's wife, received an annulment and subsequently married Pedro. Afonso spent the rest of his life and reign practically a prisoner.Helpful up-to-date information is available in
Early life
Afonso was the second of three sons born to King John IV and Queen Luisa. At the age of three, he experienced an illness that resulted in paralysis on the right side of his body. The condition was believed to have also affected his intellectual abilities. His father created him 10th Duke of Braganza.Genealogy of the Dukes of Braganza in Portuguese
After the death of his eldest brother Teodósio, Prince of Brazil in 1653, Afonso became the heir apparent to the throne of the kingdom. He also received the crown-princely title 2nd Prince of Brazil.
Reign
thumb|right|upright 1.30|Portrait of Infante D. Afonso with a Black page, by José de Avelar Rebelo, 1653
He succeeded his father, John IV, in 1656 at the age of thirteen. His mother, Luisa de Guzmán, was named regent in his father's will.
Luisa's regency continued even after Afonso came of age because he was considered mentally unfit for governing. In addition to lacking intellect, the king exhibited wild and disruptive behavior. In 1662, after Afonso terrorized Lisbon at night alongside his favorites, Luisa and her council responded by banishing some of the king's companions that were associated with the raids. Angered, Afonso took power with the help of Castelo Melhor and Luisa's regency came to an end.For overview, with bibliography, in English, see She subsequently retired to a convent,. where she died in 1666.
Afonso appointed Castelo Melhor as his private secretary (escrivão da puridade). He proved to be a competent minister. His astute military organization and sensible general appointments resulted in decisive military victories over the Spanish at Elvas (14 January 1659), Ameixial (8 June 1663) and Montes Claros (17 June 1665), culminating in the final Spanish recognition of sovereignty of Portugal's new ruling dynasty, the House of Braganza, on 13 February 1668 in the Treaty of Lisbon.
Colonial affairs
Colonial affairs saw the Dutch conquest of Jaffna, Portugal's last colony in Portuguese Ceylon (1658), and the cession of Bombay and Tangier to England (23 June 1661) as dowry for Afonso's sister, Infanta Catherine of Braganza, who had married King Charles II of England.
Marriage
Melhor arranged Afonso's marriage to Marie Françoise, daughter of the duke of Nemours,, in 1666, but the marriage was short-lived. After Afonso was declared incompetent by his brother Pedro in 1667, Maria Francisca obtained an annulment, claiming Afonso was impotent. She then married Pedro.
Afonso was a prisoner for the rest of his life. In recent years, some historians have suggested that he may have begotten illegitimate children with two nuns reputed to be his lovers (Feliciana de Milão and Catarina Arrais de Mendonça). If true, this would disprove the claim of impotence. This was proposed by Feliciana's biographer, Pedro Sena-Lino, in his doctoral thesis.
Downfall
thumb|right|King Afonso VI imprisoned in the Palace of Sintra, by Alfredo Roque Gameiro
In 1667, Pedro forced Afonso to relinquish control of the government to him, and he became prince regent in 1668. While Pedro never formally usurped the throne, Afonso was king in name only for the rest of his life.The proceedings which the annulment of Afonso's marriage involved formed the basis of João Mário Grilo's 1989 film, The King's Trial. For seven years after Peter's coup, Afonso was kept on the island of Terceira in the Azores. His health broken by this captivity, he was eventually permitted to return to the Portuguese mainland, but he remained powerless and kept under guard. At Sintra he died in 1683.
The room where he was imprisoned is preserved at Sintra National Palace.
Ancestry
{{Ahnentafel
|align=center|collapsed=yes
|boxstyle_1=background-color: #fcc;
|boxstyle_2=background-color: #fb9;
|boxstyle_3=background-color: #ffc;
|boxstyle_4=background-color: #bfc;
|1= 1. Afonso VI of Portugal
|2= 2. John IV of Portugal
|3= 3. Luisa de Guzmán
|4= 4. Teodósio, 7th Duke of Braganza
|5= 5. Ana de Velasco y Girón
|6= 6. Manuel, 8th Duke of Medina Sidonia
|7= 7. Juana de Sandoval y la Cerda
|8= 8. João, 6th Duke of Braganza
|9= 9. Catarina of Portugal
|10= 10. Juan, 5th Duke of Frías
|11= 11. María Téllez-Girón y Guzmán
|12= 12. Alonso, 7th Duke of Medina Sidonia
|13= 13. Ana de Silva y Mendoza
|14= 14. Francisco, 1st Duke of Lerma
|15= 15. Catalina de la Cerda y Portugal
}}
