After Napoleon's definite defeat in 1815, a clandestine Supreme Regenerative Council of Portugal and the Algarve was formed in Lisbon by army officers and freemasons, headed by General Gomes Freire de Andrade—Grand Master of the Grande Oriente Lusitano and former general under Napoleon until his defeat in 1814—with the objective to end British control of the country and to promote "the salvation and independence" of the "pátria". In its brief existence the movement attempted to introduce liberalism in Portugal, although it ultimately failed to do so. In 1817 three masons, João de Sá Pereira Soares, Morais Sarmento and José Andrade Corvo, denounced the movement to the authorities, who arrested many suspects, including Freire de Andrade, who was charged with conspiracy against John VI, represented in continental Portugal by a regency, then overseen by the British military authority headed by William Carr Beresford.