The Assembly of the Year XIII replaced the Triumvirate with a unipersonal head of state, the Supreme Director of the United Provinces of the Río de la Plata. Gervasio Antonio de Posadas was appointed Supreme Director, and Azcuénaga selected as one of his five advisors. In 1816 the Cabildo appointed him as protector of the freedom of the press. He became a member of the Congress of Tucumán in 1818, when it was moved from San Miguel de Tucumán to Buenos Aires. He was elected vice-president of the Congress in September and reelected in May 1819. The defeat of Buenos Aires in 1820 at the Battle of Cepeda, part of the Argentine Civil Wars, led to the closing of the Congress.