The new president was a man whose general intelligence and ability and knowledge of diplomacy, law, and economics gave the country a successful and rational government. Though he abandoned Sucré's premature attempt to reform the taxing system, he energetically applied and improved the old imposts and soon brought some order out of the financial chaos. His army was the best organised, disciplined, and equipped in South America. He also tried to attract European immigration and to improve agricultural, commercial, and social conditions and methods. The difficulties of communication and the conservative and industrially unenergetic character of the population, however, prevented any rapid development. Peru was distracted by civil commotions, and Santa Cruz pressed hard on the northern country. He probably could have forced the cession of adjacent seacoast to the inestimable and lasting benefit of Bolivia, but his ambition led him farther. Appealed to for help by one of the rival Peruvian factions, he gave it upon the condition that that country should be divided, the two parts uniting with Bolivia in a confederation of which he was to be the supreme head. In 1835 he invaded Peru and made himself master of the country.

The creation of the Peru-Bolivian Confederation was an especial menace to Chile and the Argentine. The latter country, still a prey to the most lamentable civil disorders, was in no position to undertake any effective intervention, but Chile's already strong and well-established government determined to restore the balance of power. Pretexts for war were soon found, and the more solid texture of Chile's social and political organisation, the energy of her people bred in cold regions, and her command of the sea, quickly made themselves felt. The first expedition sent to Arequipa in 1837 was compelled to retire by an army which Santa Cruz despatched down the Cordillera from La Paz. The factions in Peru, however, rose and in the following year Chile renewed the war. On the 20th of January, 1839, with the aid of the Peruvian auxiliaries, the Chileans overwhelmingly defeated an army of Bolivians and Peruvians under Santa Cruz at the battle of Yungay.

The fragility of the foundations upon which Santa Cruz had rested his system was now apparent. The "Peru-Bolivian Confederation" disappeared from the map. Peru re-established her independent existence with her old boundaries. Santa Cruz's enemies in Bolivia rose in rebellion and he fell without a struggle. As a matter of fact the ten years of his more or less orderly government had not changed the character of the Bolivian Creoles and mixed-bloods. His government had been military, reactionary, and a mere makeshift; the Indians still occupied their inferior position, the lower classes regarded the ruling coteries as self-seeking aristocrats, a dull discontent fermented among the whole population, and the ambitious chieftains found little difficulty in seducing the soldiery. Bolivia, definitely cut off from the Pacific, helpless to defend her interests in the plains surrounding the plateau, unable to attract the fertilising and civilising currents of commerce and immigration, entered upon an epoch of civil war, pronunciamentos, and dictatorships which lasted nearly half a century. A recital of the literally countless armed risings, and of the various individuals who exercised, or claimed to exercise, supreme power, would throw little light on the progress of the country. Foreign commerce and domestic industry were so small that the government was always poor and unable to meet its expenses. Peru's possession of the seaports held Bolivian commerce at her mercy, and the military and naval power of Chile was a continual menace. Either of Bolivia's larger neighbours could easily bring on a revolution by opportune aid to ambitious factions, and the turbulence of the Creole military classes was not restrained by any powerful and intelligent commercial and industrial population.

In the midst of the fighting which followed the overthrow of Santa Cruz, a liberal Constitution was proclaimed which attempted to take from the executive his preponderance in the government. Negro slavery was abolished and the movement was altogether in the direction of democracy and against the property-holding classes. In 1840 General Ballivian overcame all his rivals and gained supreme power. In the following year the dictator of Peru, taking advantage of the continual disputes over questions of transit through Peruvian territory, and thinking that in Bolivia's enfeebled condition she would not be able to resist incorporation, led a large army over the border and occupied the province of La Paz. But the Bolivians rallied around Ballivian and defeated the Peruvians in the battle of Yngavi near the end of 1841, a victory which definitely assured the independence of Bolivia.

Ballivian had risen to power by brute military force and crushed out the feeble attempt at popular government made after the fall of Santa Cruz. Despotic, irritable, and ambitious, he had not the wide knowledge or administrative capacity of Santa Cruz, and he gave the country a much worse government. The pride of the turbulent half-breeds was roused by the victory over the Peruvians, and conspiracies and insurrections occurred more frequently. Ballivian ordered the liberal Constitution of 1839 to be repealed and the preponderance of the executive in the governmental system was restored by the Constitution of 1843. He ruled until 1848, but the partisans of Santa Cruz grew bolder and bolder. In spite of the president's efforts to surround himself with officials of talent and intelligence, the power of the government decreased. The irrational and artificial boundaries given to Bolivia by Bolivar continued to involve her in disputes with Peru, and in 1847 the imposition of practically prohibitive duties nearly brought on war. Ballivian assembled an army, but Castilla, the Peruvian president, found means to foment an insurrection, and the Bolivian president was soon engaged in a desperate conflict with the very men whom he had expected to lead against the foreign enemy. Successful at first in his operations, one mutiny was suppressed only to be followed by others more formidable, and he finally gave it up in disgust and retired to exile.

A year of confused struggling followed and at last General Belzu succeeded in establishing himself as dictator. Of low origin and uneducated, passionate and violent, the new ruler owed his elevation to his popularity with the common soldiery and the lowest classes of the population. His so-called policy of conciliation amounted in fact to permitting the guerilla bands to do as they pleased. Rapine, robbery, and riot became almost the normal condition of the country, while the better elements never ceased their conspiracies. Doctor Linares, a man of probity and learning, though stubborn and uncompromising, persisted untiring in his efforts to rid the country of the dictator. For seven years, however, Belzu maintained himself, while Bolivia fell lower and lower into the pit of anarchy, disgraced abroad by the actions of an ignorant tyrant who broke treaties, refused to listen to the protests of foreign ministers, and finally bundled them all out of the country, secure that on his mountain-tops no army could reach him to avenge the insult. The British foreign office literally wiped Bolivia from the map, declaring that she could no longer be recognised as a civilised nation. At last the dictator tired of his place and voluntarily resigned it, leaving as his successor a bastard son-in-law, named Cordova. The latter suppressed nine revolutionary movements in three years before he was at last overthrown by the indefatigable Linares.

The new dictator started in with the good wishes of the respectable elements, and earnestly tried to raise his country from the abyss into which she had fallen. But the nation had been so thoroughly demoralised that there was no foundation to build upon. The public offices were filled by political favourites, but when he threw them out and tried to put honest and competent men in their places he lost the good-will of the office-holding class. He tried to reform the army and dismissed the useless swarm of officers without commands, but this gained him the enmity of the military. The very ministers whom he had selected to aid him in putting reforms into effect plotted against him, and it was a conspiracy led by Fernandez, the member of his cabinet in whom he placed his greatest confidence, that brought about his fall after he had ruled three stormy and anxious years.

A period of frightful confusion, known as the presidency of General Acha, ensued. The chiefs fought among themselves with such ferocity that in Chile and Peru the partition of Bolivia was seriously discussed. Finally, at the end of 1864, a remarkable man came to the front out of the tangle. This was the celebrated dictator, Melgarejo, who frankly abandoned all pretence of governing by any sanction except that of brute force and terror. He kept up a great army of spies, and the conspiracies which they reported were ruthlessly crushed by the well-paid ruffians who composed his army and blindly obeyed his capricious commands. One day the dictator, drunk, as was his habit, called the guard and ordered them to jump out of the windows in order to show a visiting foreigner the superior discipline of the Bolivian soldier. Several had broken their arms or legs, but he did not even look to see, and continued his demonstration by ordering his aide-de-camp to "lie dead" like a poodle dog. Taxes were arbitrarily levied; peaceable citizens were exiled and shot; around him circulated a crowd of parasitic functionaries. But in spite of his extravagances and cruelties Melgarejo gave some solidity and consistence to the governmental structure. The production of silver had been declining until about 1850, but at the beginning of Melgarejo's administration had again reached ten millions annually, and thereafter rapidly increased with the encouragement given by him to the investment of foreign capital. Money was freely spent on public works, and the Mollendo railroad, extending to the head of Lake Titicaca, dates from this time. It is the principal route for Bolivia's foreign commerce, though it does not touch Bolivian territory. The isolated desert region on the coast began to be exploited and the guano, nitrate, copper, and silver found there vastly increased the country's revenues, although a considerable foreign debt was incurred.

Melgarejo's enemies succeeded in overthrowing him in 1871, and their leader, General Morales, succeeded to the supreme power. There followed some relaxation of the system of personal tyranny, but in the main the form of the administration changed little, either under Morales or his immediate successors. The first named was able to negotiate a European loan to be employed in the building of railways, and in fact one was constructed—running from Antofagasta on the nitrate coast over the Cordillera and across the Puna table-land to the centre of the country at Oruro. Heavy gradients, the unproductive character of the region along the line, and its length, have prevented its furnishing the cheap and practical outlet to the sea which had been hoped for. Insurrections continued to break out from time to time, and in 1876 General Daza usurped supreme power. His rule lasted until the Chilean war of 1879, but the first decisive defeat was the signal for his fall.

Narciso Campero became president, and the Bolivian nation, hopeless of recovering its coast provinces by force of arms, began the task of re-adjusting itself to the new conditions. The Constitution was re-written in its present form, and a succession of presidents have since ruled the country in a peace and security which forms a happy contrast with the anarchy that preceded Melgarejo's advent. The production of silver rapidly increased, reaching fifteen million dollars in 1885, when Pacheco was president, and growing to twenty millions in 1888 with Arce in the executive chair. Potosí still yields three million ounces per annum, and the great Huanchaca mines far surpass Potosí, making Bolivia the third silver-producing country in the world. But her great resources can never be profitably utilised until a practical outlet to the sea has been found. On the Pacific she has been absolutely shut in since the Chilean war—Peru controlling the northern fourth of the coast which separates her from that ocean and Chile the remainder. Bolivia is without a seaport, though she retains a hope of receiving compensation for the loss of her nitrate territory in the cession of one such outlet, when Chile and Peru are able to come to an agreement about the province of Arica. But the explorations of Heath on the upper tributaries of the Madeira resulted in discoveries which may ultimately enable Bolivia to utilise the magnificent fertile plain lying just at the foot of the table-land, but so far well-nigh as inaccessible as the South Pole. Broad and navigable rivers meander through this vast region, needing only the construction of a railway around the Madeira rapids to communicate with the Amazon and the Atlantic.