John IV (Portuguese: João IV de Portugal,) was the King of Portugal and the Algarves from 1640 to his death. He was the grandson of Catherine, Duchess of Braganza, who had in 1580 claimed the Portuguese crown and sparked the struggle for the throne of Portugal. John IV was nicknamed John the Restorer (João o Restaurador). On the eve of his death in 1656, the Portuguese Empire reached its territorial zenith, spanning the globe. He was one of the main forces behind the independence of Portugal after Spanish rule.