Other Spanish settlements followed, including La Paz (1548), Cochabamba (1574), and Oruro (1604). Alto Peru (Upper Peru), as Bolivia was known during the period of Spanish rule, was at first a dependency of the Viceroyalty of Peru. In 1776 it was transferred to the newly formed Viceroyalty of La Plata.
Independence was declared in 1825 by an assembly which met in Chuqisaca (Sucre). General Antonio Jose de Sucre, who, in comand of Colombian troops, played a leading role in the defeat of the Spanish garrison, was elected as the first president. The following year a constitution was drawn up by Simon Bolivar and adopted. It was then that the country received the name of Bolivia. A long period of internal struggle and instability followed with dicators, mainly military, ruling the country. Some of these dictators involved themselves in the internal struggles of Peru (in which Chile also intervened), while others struggled to prevent the annexation of Bolivia by Peru. The position of Bolivia's boundaries was uncertain and subject to conflict. However, Bolivian territory extended to the Pacific and included most of the coast of the Atacama desert and the port of Antofagasta. The discovery of rich nitrate deposits in the Atacama desert and rising border tensions led the outbreak of war betweeen Chile and Bolivia (1879-1883), in which Peru participated on the side of Bolivia. Chile's victory in this war resulted in Bolivia's loss of its outlet to the Pacific. Efforts, mainly political, to regain some outlet to the sea failed. The railway which linked Bolivia with the Pacific coast (Oruro-Antofagasta) was inaugurated in 1892.
The frequent changes in the regime were often accompanied by changes in the constitution. Thus, from the declaration of independence to the end of the nineteenth century, ten different constitutions were enacted. In 1904 Bolivia lost a substantial part of its possesions in the eastern lowlands to Brazil. Defeated in a war with Paraguay (1932-1935), Bolivia lost most of its territory in the Gran Chaco. At present, Bolivia extends over less than half the territory over which it claimed soveriegnty when it declared independence. The expansion of mining from the end of the nineteenth century attracted foreign investment. This led to the development of three large foreign mining corporations that became dominant in Bolivia's economic and political life. These, together with large landowners and the military, actually controlled the country.
In 1952 a revolutionary party (Movimiento Nacionalista Revolucionario MNR) seized control of the government. This led to the expropriation of the mines by the state and to agrarian reform, by which the large estates were divided among former tenants and peasants. Before it was deposed by the army in 1964, the MNR introduced far-reaching economic and social changes. Over the next 25 years (1964-1989) Bolivia has 19 presidents (13 were generals), with only two completing a full term in office.