He was appointed Governor of Lisbon in 1836 and was a confident of Queen Maria II of Portugal. The year he was appointed, he used force to put down radical mobs in Lisbon (the Massacre do Rossio). He restored diplomatic relations with the Vatican and re-introduced a conservative Constitutional Charter. Following an 1842 coup d'etat, he was appointed as Minister and Secretary for Royal State Affairs (the equivalent of a today's Interior minister) in 1843. In 1846 famine led to the peasant revolt Maria da Fonte in the north of Portugal, and he was removed from office. He fled to England but was restored to power in 1848. Again due to his unpopularity and the now poor economic state of Portugal he was replaced for a second time by the Duque de Saldanha in 1851.