After the Pacific War, the first presidency of Andrés Avelino Cáceres fares better, negotiating a more balanced Grace contract and expanding the railroad network inwards, instead of export-oriented only. Also, having rallied the native peasants for his Breña guerrilla campaign against Chile in the past, Cáceres knows their potential, and initiates a state policy of education and infrastructure building. In his second term he even gives natives some political rights, in order to integrate them in the incipient industrialization projects being built on Cusco, Arequipa, Cajamarca and Puno. These policies are continued by his successors. The 1904 earthquake hits Lima harder than OTL, prompting the change of the capital city from Lima to Cusco.
Meanwhile in Ecuador, Eloy Alfaro is deposed and killed by a Conservative coup in 1896, starting a long and gruesome civil war. After some shooting incidents with border guards, and terrible stories from Ecuatorian refugees, Peruvian troops occupy southern Ecuador and Guayaquil in 1903 with light resistance, for it was far better than the civil war. Order is restored and a new government is placed on Quito in 1904, but in December a parlamentary scandal triggers another coup and civil war. In 1905, Ecuador is occupied by Peruvian forces again, this time including Quito and northern cities. In 1906, tired after a decade of constant war, Ecuatorian citizens vote in a plesbicite for integration with Peru.
Eloy Alfaro, the last liberal president of Ecuador
Jorge Chavez' flight over the Alps doesn't end in tragedy. He survives, and using his contacts with French air entrepeneurs and the Peruvian government, he founds in 1912 (with private and state capital) the Compañía de Aviación Chávez-Blériot, which would be the seed for Peruvian aircraft industry. In this young company, several engineers and scientists would develop their talents, among them is a bright and innovative engineer named Pedro Paulet.
Jorge Chávez, father of the Peruvian aeronautics
In Bolivia, the 1898 uprising of Pablo Zárate and José Manuel Pando is successful, but Zárate is betrayed and killed by Pando, and his native followers are scattered and demoralized. But they will remember the betrayal for years to come. Pando and his Liberal Party try to modernize the Bolivian state and harness the rising tin prices; but unlike OTL, it is harder to employ native workforce in the tin mines because they oppose Pando at every turn. This results in Pando's government becoming more authoritarian, and when tensions in the Acre region rise and Brazil threatens with sending troops, Pando calls the bluff instead of retreating and risking to look weak.
The Acre War is a disaster for the Bolivians, with their outnumbered and demoralized troops being hampered by native attacks on their logistical lines. In the end, the Brazilian government only takes the Acre region on dispute (they don't want to take any province with potentially hostile natives), but also extort heavy reparations, that shall come directly from the tin minimg profits. By 1901, Pando is deposed and a Conservative government takes hold, but having to pay reparations and with the national morale broken after another lost war, a multi-sided civil war erupts in 1904, with liberals, conservatives, natives and many caudillos fighting each other.
President José Manuel Pando couldn't deal with the Bolivian indios
In the end, Peruvian forces entered Bolivia in 1910 just like they did in Ecuador earlier, supported by natives who saw how Peruvian indios and mestizos were developing in the fledgling industries in the Peruvian Andes. By 1911, a plebiscite incorporates Bolivian territories and population into Perú.
This causes great alarm in Chile, but there is little they can do. Peru has been preparing for a land war for the last decade, and also secured an informal alliance with Argentina. While Chile was sure they would win in naval battles, but Peru was not as dependent from the coast as before, with their developing rail network and manufacturing structures in the Andes; and a possible war with Argentina would be a defensive nightmare for Chile. In the end , Peru promises that they will not expand further and will honor the Treaty of Ancon, as long as Chile makes the promised plebiscites on Tacna and Arica. Chile has no option but to accept, and restitutes these provinces to Peru, in exchange for a treaty that prevents further expansion. Argentina also wants to prevent Peru from becoming larger, but entangles in an alliance with them because in the end both nation's interests don't collide.
By the start of WW1, Peru and Argentina are allies and great trading partners, with a railroad connecting Cochabamba with Salta expanding commercial, industrial and scientific exchange. Both nations declare themselves neutral but profit from selling to both sides. After the end of the Great War, Peru tries to buy German industrial and scientific assets in the civilian and aviation industry, while Argentina does the same with naval elements. The effect of British economic troubles on Argentinian economy are not as severe as OTL thanks to greater trade with Peru, better internal market development, and trade with the US.
In the 1920s, Peru and Argentina deepen their trade and military ties, and while they participate in the global economy (and buy goods from the US), they will protect and develop key industries, that will not be affected as much during the Great Depression. One of these will be the aircraft industry, with the Compañía de Aviación Chávez developing the first indigenous airplanes for passenger travel in South America, such as the renowned Chávez NP-02. Meanwhile, Pedro Paulet was conducting large scale experimentation with rockets since the 1920s, after several attempts with smaller vessels since the early 1900s and designs of futuristic aircraft in Europe, where he met and befiended the young Wernher von Braun.
Pedro Paulet's "Avión Torpedo", or how he imagined rocket propelled aircraft
By the late 1930's both nations are well on their way to economic recovery, in no small part thanks to industrial investment on military assets. By 1937, Argentina launches the aircraft carriers ARA Independencia and ARA Veinticinco de Mayo in 1939, while Peru launches the BAP Coronel Bolognesi in that year (the flagship Almirante Grau is a WW1 dreadnought, modernized).
Both nations played an important role in WW2 as part of the Allied camp. Their fleets engaged Japanese vessels and sunk several destroyers, cruisers and a battleship, while they would send divisions on the invasion of Italy along the Brazilians. Meanwhile several fighters and medium bombers participated in Europe. But by far the most public Peruvian contribution to the war would be the entrance of the Chávez CAX-3 Cóndor, a "prototype" (near final version) jet fighter that gave a nasty surprise to the German Me-262 pilots in October 1944, for they were no longer the only nation with operational jets in combat roles.
When the war ended, Peruvian and Argentinian operatives were able to extract a few scientists and technicians from Germany, including von Braun, who kept in contact with Pedro Paulet through letters until 1945. He would further improve Peruvian aeronautic industry, and would participate in the joint space flight efforts between the United States, Canada, Peru, Argentina and Brazil, from the 1950s until his death in 1977.
Wernher von Braun, chief of the Agencia de Investigación Aérea y Espacial del Perú
Today Peru is a first world nation, with a prestigious aerospace industry, as well as electronics, naval and applied research endeavors. It participates in several United Nations peacekepping operations, and contributed in the Gulf War, the Bosnian War, the Irak War, among others. Peru is also contributing to the fight against Islamic insurgents with air power and special forces at this time.