20 April 1845,
Ramon Castilla assumed the presidency. His government represented one of the greatest events in the republican history of the nation, for the reason that
Peru entered a stage of internal and external peace, progress, power, and international prestige. From 1845 to 1862, Castilla exercised influence over the daily life of his citizens. His first government ended on 20 April 1851 allowing the general
Jose Rufino Echenique assume power. Echenique, a prestigious military officer, had been one of the top advisors of Castilla's government. Using his extensive military influence, Echenique continued on the progress of Castilla's government to further advance the social and economic aspirations of Peru. Echenique's government, although emphasizing a policy of progress, was made up of mainly political conservatives, and suffered much opposition from liberals who eventually rebelled against his government.
Ramon Castilla eventually became involved in the rebellion, soon becoming its leader. In the battle of La Palma, in the outskirts of Lima, Echenqiue was defeated and Ramon Castilla assumed the presidency for a second time. The reinstating of Castilla as president brought institutional stability; management of the national economy by establishing fixed budgets; economic prestige abroad by the repayment of foreign debt; internal security; international position on the continent; intellectual and material progress; as well as the initiation of the development of the Amazonia.
Economy The economic aspect of the era was expressed by the management of state finances through the implementation of budgets. During this time the economy was experiencing a boom due to
guano being sold to European markets. This allowed the government to repay its external debt, earning it international economic prestige. Before Castilla, state expenses were calculated in a disorderly fashion: Castilla implemented the budget system as well as organized the sale of guano by the system of appropriations. Using the guano money, he was able to settle international debt with various nations which had existed since the time of independence. Communications to the interior began to improve with the construction of new highways and the implementation of railroads. The first railroad that was constructed was during Castilla's first term between
Lima and
Callao. During Echenique's government, the
Tacna–Arica railway was constructed and in Castilla's second term, the Lima-
Chorrillos railroad was implemented.
Social and demographic issues Fueled by the export boom of guano, a new era of free-trade liberalism emerged that fueled great social and demographic changes. One such change was the abolition of indigenous tribute in 1854. By abolishing indigenous tribute, the indigenous population were now only subject to standard property or poll taxes, as well as having more opportunities for economic freedom in the new economy fueled by guano. The abolition of African slavery in 1855 soon followed, also intending for the freed slaves, like the indigenous, to become laborers in the new economy. To compensate for the lack of workers on the haciendas of the coast, the government of Castilla in 1849 authorized the import of Chinese people to devote to agricultural work. It thus opened the door to Chinese immigration that more diversified the races of the nation. During this time, European immigration was also encouraged, and thousands of Europeans sailed from Europe to the ports of
Trujillo,
Huacho,
Callao,
Ilo, and
Arica. Most of them settled along the coast or slightly inland. Not many settled into the interior. An exception to this would be a German population which arrived at the port of Huacho and traveled inland to colonize the
Pozuzo and
Oxapampa regions.
Education Castilla in his first government was concerned about bettering the education of the nation. He created the
First Regulation of Public Education. During his second government, he created a second regulation defining the levels of primary, middle, and superior education.
Judicial The task of replacing Spanish legislation laws for another, appropriate to modern republican times, had been almost forgotten. The country was governed by laws which were established by the King of Spain as they were old laws, functioning since before independence. Castilla took the first step in reforming the judicial system. Partly finished, the first of these laws, named the "Civil Codes" were put into place in 1852 and lasted until 1936. During this time period, they were accompanied by the "Prosecution Codes" and the "Commerce Codes".
Foreign relations where from much of the guano originated At this time, Peru was viewed from the exterior as a non-aggressive country. Its international policy was based on the ideas of
continentalism and solidarity between countries of the
Western Hemisphere. With this objective, in 1848 the
First American Congress met in
Lima with the goal of to ensure the bases of future peace and security for the nations of South America. During the government of Echenique, Peru began to fix its international borders with neighboring countries. The first treaty convienied in this time period was that with Brazil, signed in 1851, establishing borders between the two nations.
National defense Ramon Castilla clearly realized the deficiencies of the
Armed Forces and sought to fix them. Because Peru was geographically situated in the central part of western South America, with an immense coast (at that time extending from
Machala to the
Loa River) and with borders with four nations (currently with five), there was a necessity for self-defense. Castilla sought to expand and well-equip the
Peruvian Navy. His naval policy was that if Chile constructed one ship, he should construct two, and he went on to turn the Peruvian Navy into the most powerful of South America. He acquired the frigates "Mercedes",
"Guisse", "Gamarra", "Amazonas", and "Apurimac" as well as the Schooners "Tumbes" and "Loa". He also built the naval ports of
Paita and
Bellavista. Hew also acquired the first steam-powered
warship of any South American country and named it the "Rimac". To better educate the officers of these new ships, he sent them to study with the various navies of European nations. For the defense of the Amazonia, Castilla began to develop an Amazonian fleet with the purchase of the ships "Morona", "Pastaza", "Napo", and "Putumayo", which were based in the port of
Iquitos. Also during this time was the invasion of Ecuador which caused the
Ecuadorian-Peruvian War of 1858–1860 in which Peru emerged victorious. ==War with Spain==