High Quality Content by WIKIPEDIA articles! Dom Luís de Vasconcelos e Sousa, 3rd Count of Castelo Melhor (1636 August 15, 1720) was a Portuguese politician and prime minister. Portuguese royal favourite who, as effective governor of Portugal from 1662 to 1667 during the reign of Afonso VI, was responsible for the successful prosecution of the war against Spain, which led, in 1668, to Spanish recognition of Portugal's independence. Shortly after Afonso VI's coming-of-age in 1662, Castelo Melhor saw an opportunity to gain power at court by befriending the mentally unstable king. He managed to convince the king that his mother, Luisa of Medina-Sidonia , was out to steal his throne and exile him from Portugal. As a result, Afonso took control of the throne and his mother was sent to a convent. 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.