In March 1811 during the Spanish American wars of independence, the first Venezuelan constitutional congress established as the executive power a triumvirate in which three men shared executive power and rotated the presidency every week. At age 39, Mendoza became a member of the triumvirate that headed the First Republic of Venezuela and was unanimously elected by the other two as the first to go in rotation on 5 March 1811. With Manuel Moreno de Mendoza serving as the interim first president in his absence, Mendoza arrived in Caracas to begin serving his first week-long term on 25 April 1811. As part of the triumvirate, Mendoza began the war for independence against the parts of Venezuela that still supported the Spanish monarchy. He also was the author of the Venezuelan Declaration of Independence, issued on 5 July 1811. While in office he formed part of the constitutional convention that designed and promulgated the first Constitution of the Republic of Venezuela in December 1811. In March 1812, a second presidential triumvirate was appointed, with Mendoza, Juan Escalona and Baltazar Padron resigning and Fernando Toro, Francisco Javier Ustáriz and Francisco Espejo taking power.