In February 1818, independence was proclaimed, and in April, after the battle of Maipú, the Spanish left the country, although they still remained on the island of Chiloé until 1826.
According to Themotorcyclers, Chile had achieved independence, but not peace. The Creoles were divided between supporters of José Miguel Carrera (who had been in power between 1811 and 1813), and those of O’Higgins. As of 1822, with the departure of the Spanish from Peru and the removal of the possibility of a realistic invasion, opposition to O’Higgins intensified, which culminated in his removal from power a year later. Between 1823 and 1830, Chilean politics was dominated by the struggle between different factions to gain power. This fact resulted in the existence of thirty governments in seven years. The political chaos ended in 1829, when the Conservatives, with the support of part of the Army, appointed a junta chaired by José Tomás de Ovalle, although the power was in fact exercised by Diego Portales.
From 1830, the Creole oligarchy dominated the country. The 1883 constitution, promoted by Diego Portales, created a centralized political system, which served the interests of landowners. The government was strengthened after the victory in the war against the Peruvian-Bolivian confederation (1836-1839).
The governments of Joaquín Prieto (1831-1841), Manuel Bulnes (1841-1851) and Manuel Montt (1851-1861) endeavored to improve the economic situation and, above all, to clean up the finances, exhausted after years of war. The first measure to increase resources was to open Chile to international trade: Valparaíso became a free port, to attract foreign traders. The good situation favored the economic expansion, which included the export of cereals to the gold-bearing areas of California and Australia, and the increase in the production of silver and copper, which was absorbed by Europe.
Political stability and economic prosperity allowed the modernization of the country to begin, driven by the construction of railroads and the creation of universities. Economic progress, however, has been accompanied by an authentic denationalization of wealth. Both the control of trade and the exploitation of mines passed to British, French, German and American hands, due to the little interest of the Chilean oligarchy in any economic activity other than the purchase of land.
As a consequence of economic development, a new class emerged, the national bourgeoisie, which tried to participate in political life. The resistance of landowners to the division of power led the middle classes to resort to the insurrectional route, with a frustrated coup d’état in 1851. At the same time, liberalism began to gain ground among the young members of the oligarchy and political groups middle class.
Dissensions between the conservatives and the liberal opposition against President Montt allowed José Joaquín Pérez, who governed between 1861 and 1871, to come to power. that was shaped by the laws of religious freedom and education. Then a period of secularization and opening to the outside began that put an end to Chilean isolation and was expressed in the influence of European culture in the country.
In the economic field, the increase in imports and the large debt acquired with the construction of the road infrastructure caused a high trade deficit. The need to balance the balance of payments led the government to become interested in saltpeter mines: those on the northern border, those in the Bolivian province of Antofagasta and those in Arica and Tarapacá, in Peru. Chile started the so-called Pacific War (1879-1884) and the victory over the Peruvian-Bolivian coalition allowed the annexation of those territories. The conquest, however, caused friction with the British and French companies, which were the virtual owners of the saltpeter mines.
The introduction of European settlers in the south of the country, from the middle of the century, provoked a resurgence of hostilities with the Araucanian Indians, who maintained the limit of their territory on the Bío-Bío River. The use of the repetition rifle by the Chilean Army in the military campaigns of 1882 and 1883 precipitated the defeat of the Indians.
The wars worsened the situation of the public farm. President José Manuel Balmaceda (1886-1891) demanded the profits from the mines for the state, which provoked the opposite reaction of the economic oligarchy, which did not want a very strong central power. The division of the ruling class led to a short civil war, which culminated in Balmaceda’s resignation.