Afonso VI ([ɐˈfõsu]; English: Alphonzo or Alphonse, Old Portuguese: Affonso; 21 August 1643 – 12 September 1683), known as "the Victorious" (o Vitorioso), was the second King of Portugal and the Algarves of the House of Braganza from 1656 until his death. He was initially under the regency of his mother, Luisa of Medina-Sidonia, until 1662, when he removed her to a convent and took power with the help of his favourite, the 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. However, the king was physically and mentally weak. In 1668, his brother Pedro conspired to have him declared incapable of ruling and took power as regent. His French wife, Queen Marie Françoise, received an annulment and married Pedro. Afonso spent the rest of his life and reign practically a prisoner.
At the age of three, Afonso suffered an illness that left him paralyzed on the left side of his body, also leaving him mentally unstable. His father created him 10th Duke of Braganza.
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 received also the crown-princely title 2nd Prince of Brazil.
He succeeded his father (João IV) in 1656 at the age of thirteen. His mother, Luisa of Medina-Sidonia, was named regent in his father's will. His mental instability and paralysis, plus his lack of interest in government, left his mother as regent for six years, until 1662. Afonso oversaw 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 saw the Dutch conquest of Jaffnapatam, 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, Catherine of Braganza, who had married King Charles II of England. English mediation in 1661 saw the Netherlands acknowledge Portuguese rule of Brazil in return for uncontested control of Ceylon.
In 1662, the Count of Castelo Melhor saw an opportunity to gain power at court by befriending the king. He managed to convince the king that his mother was out to steal his throne and exile her in Portugal. As a result, Afonso took control of the throne and his mother was sent to a convent.
He married Marie Françoise of Nemours, the daughter of the Duke of Savoy in 1666, but the marriage was short-lived. Marie Françoise, or Maria Francisca in Portuguese, filed for an annulment in 1667 based on the impotence of the king. The Church granted her the annulment, and she married Afonso's brother, Pedro, Duke of Beja (the future Peter II).
That same year, Pedro managed to gain enough support to force the king to relinquish control of the government and he became Prince Regent in 1668. Afonso was exiled to the island of Terceira in the Azores for seven years, returning to mainland Portugal shortly before he died at Sintra in 1683.
His trial is the basis of João Mário Grilo's 1990 film, The King's Trial (O Processo do Rei).