On July 20, 1810, a revolt began in Bogotá that demanded and obtain the convocation of an open town meeting. This meeting elected by popular acclamation a Supreme Junta of the Kingdom of New Granada, with Viceroy Amar as its president. However, his election as president received little support in the city, and there were rumors he planned a counterattack. On July 25, 1810 he was removed. José Miguel Pey, the new president of the Supreme Junta, ordered the arrest of the viceroy and his wife.