Declaration of independence The territory that conformed the Confederate subdivision of
North Peru was proclaimed independent of the
Peru-Bolivian Confederation by
Luis José de Orbegoso on July 30, 1838, until the territory was conquered by the
United Restoration Army on August 21, 1838. Orbegoso led a military campaign against
Andrés de Santa Cruz together with the opponents of the confederation and were first allied with the Peruvian-Chilean alliance of the
United Restoration Army. Before the acts of vandalism committed by the Chileans on north-Peruvian soil, however, and the little interest apparently shown by the Chilean generals, the Northern Peruvian Republic was led to declare war on both the confederation and the Peruvian-Chilean alliance.
Battle of Portada de Guías . The restorative forces continued their advance towards Lima and encountered the Peruvian forces commanded by Orbegoso,
Nieto and
Vidal on the outskirts of Lima. The numerical difference was overwhelming: some 4,800
restaurateurs' compared to about 1,300 Peruvian
orbegosistas. Despite this, a battle took place nevertheless, today known as the
Battle of Portada de Guías, in which the restaurateurs won on August 21, 1838 and occupied
Lima until the Confederates occupied it again.
Gamarra, who had a more pro-Chilean stance, became president by way of
open cabildo on August 25. Orbegoso remained hidden in Lima for a few days, until he fled to
Callao in unsuccessful disguise, being recognized. After being shot, he hid on the seashore remaining barely alive until the next day, where drenched and cold, he found refuge in the port within the
Real Felipe Fortress. The port would see itself at the center of an ensuing
siege between the restorationists and the confederates. ==Reunification with the Confederation==