Afonso VI (English: Alphonzo or Alphonse, Old Portuguese: Affonso), 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.