He was educated at the Royal College of San Carlos, but left without finishing his studies. During the British Invasions he served as Third Lieutenant of the Galicia Volunteers. He participated in the open Cabildo on May 22, 1810 voting for the deposition of the viceroy. He had a strong influence on the First Triumvirate and shortly after he served as Minister of Government and Foreign Affairs of the Province of Buenos Aires.