 Days later he was appointed the first president of the First Republic of Venezuela, a role he shared as part of a triumvirate.Until his term ended in March 1812, Mendoza began the war for independence against the parts of Venezuela that still supported the Spanish monarchy, authored the Venezuelan Declaration of Independence, and also took part in constructing the first Constitution of the Republic of Venezuela.In 1813 Mendoza fled a royalist invasion and moved to Grenada, and soon after he joined Simon Bolivar's effort to liberate South America from Spanish rule.