The matter was very different with the superior classes of colonists. The cause for which they had fought was of vital importance to them, and by the change from the status of a colony to that of a Republic they had gained everything. Before, they had been mere colonials, slighted by the Spaniards on every possible occasion, and permitted no say in public affairs; now they had leaped at a bound to their proper place, and were at the head of their new State. With pardonable eagerness they plunged into the campaign of speculation which was now open to them, and many of their number rapidly grew rich. Thus after a time they became employers of labour on a large scale, incidentally solving the labour question of the peasantry of the country.

Among brand-new States who have yet to prove their worth and importance the intervention of mutual jealousies may safely be counted on. In South America the appearance of these disturbing factors was not long delayed.

It was not three years after the last Spanish troops had been driven from South America that war broke out between the Republics of Bolivia and Peru. Sucre proved himself as able a leader as ever, and was as successful against his fellow-Republicans as he had been against the Royalist forces. The Peruvians were utterly defeated. As a consequence, the President, Lamar, was banished from his country, and a new official, Gamarra, was elected as provisional President.

The first war, however, did not succeed in clearing the battle-laden air, and for some while Peru was destined to suffer considerably at the hands of its neighbours. Very shortly after the conclusion of the first war a second broke out between Bolivia and Peru. The day of Sucre was then at an end, and the President of Bolivia was Andreas Santa Cruz. Santa Cruz was a powerful Chief-of-State, a born leader of men, who managed to hold his somewhat wild adherents in check.

Since no man of any other temperament could have succeeded in retaining his post in this age of turmoil and unrest, Santa Cruz proved himself a despot, but in many respects a benevolent despot, who showed an interest in genuine progress. Realizing, for instance, the serious disadvantage under which his country laboured on account of its lack of an adequate population, he devoted much of his thought and time to the amendment of this state of affairs, which he was inclined to alter somewhat arbitrarily. He urged, for instance, the taxing of celibates and their exclusion from the magistracy in order that their want of patriotism might be singled out and punished. Whatever might have been the result of measures such as these, the Bolivians proved themselves sufficiently numerous to defeat the Peruvians once again. Peru was invaded, and Santa Cruz entered Lima as its protector.

A few years later—in 1837—Peru fell into a dispute with Chile on account of the Guano provinces of Atacama and Tarapaca. Peru was again invaded, but eventually the Chileans abandoned the country and returned to their own.

After this, no little confusion prevailed in the internal affairs of Peru. Various leaders came, fought, and went, until civil war was followed by a conflict with Bolivia, in the course of which Gamarra, the Peruvian President, was killed, and the Peruvian forces were totally defeated in 1841. In 1845 there seemed a prospect of improvement in the affairs of the Republic, when Ramon Castilla was elected President. Castilla was a man of strong and progressive views, and commerce began to flourish under his guidance. He was followed by President Echenique, but returned to public life, and succeeded the latter as President after a lapse of ten years, in the course of which considerable official corruption had been shown.

In 1864 occurred the first collision with Spain since the conclusion of the war of liberation. In that year Spain sent out Admiral Pinzon to the Pacific coast in command of three war vessels. The objects of the expedition were avowedly scientific, but it met with a suspicious reception from the first on the Pacific coast. The conduct of Admiral Pinzon decidedly did not tend to allay any anxiety on the part of the Republicans. Both Peru and Chile felt that their independence was endangered, and prepared to resist.

On April 14, 1864, the Spanish vessels gave the signal for war by seizing the Chincha Islands. Hostilities, however, were staved off for a while by the action of the Spanish authorities, who stated that Admiral Pinzon had exceeded his instructions. In the meanwhile the capture of one of his smaller vessels by the Chileans had so preyed upon the Admiral's mind that he committed suicide. He was succeeded in his command by Admiral Pareja.

At the beginning of 1866 war with Spain was officially declared. The Spanish fleet had now been strongly reinforced, and some naval engagements took place between the Spaniards and the allied Peruvians and Chileans, in the course of which the Spanish squadron was repulsed. On April 25 the Spanish vessels, having already attacked Valparaiso, appeared before Callao, and a week later they began vigorously to bombard the town, which returned the fire. In this engagement both land and sea forces suffered considerably. After this the Spanish fleet sailed back to Europe, and the war came to an end. Peace, however, was not declared for two years afterwards.