Manoel de Vilhena and Count of Mértola. 1663: The Dutch ousted the Portuguese from the Malabar coast, even though this was a clear violation of their 1661 treaty. 1663: The Siege of Évora occurred when the Portuguese army led by Sancho Manoel de Vilhena and by the Count of Mértola retook the city from the Spanish occupiers, with little to no casualties. The entire Spanish garrison surrendered. 1664: The Battle of Castelo Rodrigo was fought on 7 July 1664. A regional military commander, Pedro Jacques de Magalhães, defeated the Duke of Osuna. 1664: The Siege of Valencia de Alcántara results in the successful conquest of the Spanish town of Valencia de Alcántara by Portugal in July 1664. 1665: Portugal was again victorious at the Battle of Montes Claros (on 17 June 1665), in which António Luís de Meneses and Schomberg defeated the Spanish army under the Marquis of Caracena; Spain ceased hostilities, but a true peace treaty was not signed for another three years. Montes Claros is considered one of the most important battles in Portuguese history. 1666: In an attempt to establish an alliance with France, Castelo Melhor arranged for Afonso VI to marry Marie Françoise of Nemours, the daughter of the Duke of Nemours, but this marriage would not last long. 1666: The ambitious Castelo Melhor planned to prosecute the war to the extent of taking Galicia and presenting it to the Portuguese crown as a war indemnity, but he was dissuaded. 1667: Marie Françoise petitioned for an annulment of her marriage to Afonso VI, based on the impotence of the king. The Church granted her the annulment. 1667: King Afonso VI, Castelo Melhor, and his francophile party were overthrown by the king's younger brother, Pedro, Duke of Beja, (who later ruled as Pedro II of Portugal.) Pedro first installed himself as his brother's regent and then arranged Afonso's exile to the island of Terceira in the Azores on the pretense that he was incapable of governing. Castelo Melhor fled into exile; ironically, he chose to live in England. 1667: The French alliance had been imperilled by the annulment of Afonso's marriage, but Pedro strengthened his political position by marrying his brother's estranged queen. 1668: The Treaty of Lisbon with Spain ended twenty-eight years of war. The regent of Spain, Mariana of Austria, acting in the name of her young son Charles II of Spain, finally recognized the