Answer
1640 marked the ascension of John IV to the Portuguese throne, a pivotal moment in the nation's history. He succeeded his father-in-law, Afonso VI, becoming the first monarch from the Braganza dynasty. John IV's reign was characterized by various challenges, including the ongoing Portuguese Restoration War aimed at restoring Portuguese independence from Spanish rule. His leadership proved crucial in this tumultuous period, leading to eventual success in regaining Portuguese sovereignty.