Peru–Bolivian Confederation Felipe Salaverry, who rebelled and overthrew him in 1835. Orbegoso, however, did not lose the support of southern Peru and called in to his help the president of Bolivia. It was the opportunity that Marshal Santa Cruz, himself a former president of Peru, was waiting for. The Bolivian army promptly proceeded to invade Peru. With Bolivian help, General Orbegoso quickly regained his leadership throughout the country and had Salaverry executed. As a reward for the support he had received from Santa Cruz, he agreed to the formation of the new Peru–Bolivian Confederation. Santa Cruz assumed the "supreme protectorship" of the
Trujillo, Peru only stable and productive area that could organize and lead the nascent republic. The department encompassed nearly half the country. For the efforts of its people in the war of emancipation, San Martín gave it the title of "Meritorious City Loyal to the Homeland". The municipality of the city, then called a "cabildo", was given the rank of "honorable". In 1823, after the creation of the Republic of Peru, the protectorate of José de San Martín was developed. Before royal troops took the city of Lima, the first President of Peru, Don José de la Riva Agüero, together with Sánchez