D. Luís de Vasconcelos e Sousa, 3rd Count of Castelo Melhor (1636 – 15 August 1720) was a Portuguese politician and prime minister.
[4][5][6] Melhor managed to convince the angry king to take control of the throne and send his mother to a convent.
[2][4] The King appointed Castelo Melhor his secret notary (escrivão da puridade), a position in which the favourite was able to exercise the functions of first minister.
[4][7] Castelo Melhor overcame the difficulties which had hitherto beset Portugal in the war against Spain, reorganizing the troops (now reinforced by an English contingent by virtue of the English king Charles II's marriage to Catherine of Braganza) and entrusting their command to competent generals.
[8] Consequently, the Portuguese Restoration War entered a victorious phase for Portugal (1663–65) and Spain began peace negotiations.