In his youth he dedicated himself to commerce. According to the social norms of the time, he also became a militia officer in the "Regimiento del Rey" (King's regiment). In 1810, while in Lima, he heard of the formation of the Government Junta of the Kingdom, and immediately returned to the country, where he was charged with a diplomatic mission to Buenos Aires. After that successful first mission, he was sent to England, and then to other European countries, with the mission of gathering support for the independence movement. While in Europe he learnt of the news of the defeat of the Chilean army in the Battle of Rancagua and the recapture of Chile by the Spanish troops. He then returned to Argentina to cooperate in the formation of a new army.