At Corte and having gained notoriety for his academic work and intelligence, Stockler managed to be appointed by D. John VI (12 November 1819) to replace the former-Captain-General, who had fallen in disgrace. Stockler left for Lisbon in August 1820, with the intention of receiving from the Regency the orders necessary to govern the Azores. It was during this time that a constitutional movement was taking form on the continent, resulting in the Liberal Revolution of 1820 when Stockler arrived in Lisbon. Obviously anti-Liberal, his Jacobist fame and French collaboration during the French invasion helped him to obtain an affirmation by the Liberal revolutionaries for his position, permitting his departure for the islands. He arrived on 18 October 1820 and was received by a fervor, owing to his replacing the unpopular Araújo e Azevedo. Both political groups in the Azores were hopeful for his tenure: the Liberals, expected a confirmation of the Pro-Constitutional ideas, and the Absolutists, convinced that his nomination by King D. John VI before the revolution, would guarantee his support for the dominance of the monarchy. The Absolutists were immediately vindicated when Stockler prohibited political contact with Portugal and requested new members of the administration and judiciary from Rio de Janeiro, ignoring the legitimacy and authority of Lisbon institutions.