October 28, 1836. Santa Cruz then summoned to the city of Tacna representatives of both legislatures together with those of the Bolivian Congress assembled at Tapacarí to establish a Constitution for the new State. Under his direction, they signed a pact on May 1, 1837, which named him Supreme Protector for ten years. Structure of the republic From 1837 to its dissolution were a Provisional President and a Congress, both with limited powers and under the control of Marshal Andrés de Santa Cruz, who was styled the Supreme Protector. First President: General (b. 1799 – d. 1882) (September 17, 1837 – October 12, 1838.) Second President: Juan Pío de Tristán y Moscoso (b. 1773 – d. 1859) (October 12, 1838 – February 23, 1839.) Administrative divisions South Peru was divided into five departments which in turn were divided into provinces, and these into districts. On its foundation it consisted of four departments with their capitals in the cities of the same name. A fifth, Litoral, was added in 1837 with its capital at Tacna. Development and dissolution Invested with considerable powers, Santa Cruz endeavoured to establish in Peru the same type of authoritarian order he had imposed in Bolivia. He issued a civil code, a penal code, a trade regulation, a customs regulation and procedures for reorganizing tax collection, which allowed an increase in state revenues and reduced expenditures. However, the Confederation generated resistances among several groups in both countries that resented the dilution of national identities and by neighbouring countries. Many Peruvian politicians opposed to the idea of the Confederation fled to Chile, where they received support and this led to the War of the Confederation Chile declared war on December 28, 1836, and Argentina followed suit on May 9, 1837. The Chilean military expedition against Santa Cruz, led by Admiral Manuel Blanco Encalada, failed and had to submit to the signature of the , on November 17, 1837. The Chilean government then organized a second expedition, which defeated the Supreme Protector at the Battle of Yungay on January 20, 1839, and forced the dissolution of the Confederation. When Agustín Gamarra took office as the new president of Peru on August 25, 1839, he officially declared the dissolution of the Confederation and of the merging of the Northern and Southern Peruvian Republics into a single state, again called Peru, and separate from Bolivia. See also History of Bolivia History