Then an event occurred which almost destroyed all of Bolívar's well-made plans. Some troops sent from the River Plata started a rebellion in Callao, and, before anything could be done to correct the situation, the Spanish flag was hoisted over the fortress and messages had been sent to the viceroy offering to deliver the city. Laserna sent General Rodil, appointing him governor and military commander of the province of Lima, and placing him in full command of the fortress and the treacherous soldiers. This was a severe loss for the Repúblican cause. Congress at once suspended the constitution and the law and appointed Bolívar dictator, for it realized that he was the only man to cope with the situation. The royalist army had 18,000 men, 12,000 to fight Bolívar, who was then in the city of Trujillo, and 6,000 to keep Upper Perú (now Bolivia) and the southern coast, subject to Spain. Bolívar had from 4,000 to 6,000 Colombians and about 4,000 Perúvians, all in poor condition. He gathered all the resources available in Lima, but desertion and treachery had left very little of use. At that time, to be disloyal was a fashionable thing for the insurgents of Lima. However, Bolívar would not despair. In a letter written at that time, he said:

"This year will not come to a close without our having gained Potosí."

His chief hope had been in the army of Colombia; but, while in Trujillo, he learned that the government of Colombia would not send any troops or resources without express authorization from Congress, which meant a long delay. Meanwhile, the Spaniards under command of Canterac were advancing against Trujillo. Bolívar set to work again with that feverish activity which seemed to enable him to create everything from nothing—men, uniforms, arms, horses, even horseshoes. The smallest detail, near or at a distance, was the object of his care, and he attended to everything with that precision and accuracy which form a great proportion of what we call genius.

The city of Pasco was selected by Bolívar as the meeting place of all the independent forces, and the month of May chosen for the general movement. In June the Andes were crossed, and on August 2nd, the army was assembled on the plain of Sacramento, near Pasco. There he arranged his soldiers for battle and decided to attack on the 6th the royalists, who were near by. Canterac was approaching with an army of 9,000 of which 2,000 were cavalrymen.

On August 6, 1824, at four o'clock in the afternoon, the two armies met on the plain of Junín, near the lake of that name, the source of the Amazonas. This battle was one of cavalry only, and was in appearance and in results one of the most terrible. Throughout the whole combat not one shot was fired. Only the horsemen fought, but the defeated royalist cavalry on retreat, drew the infantry with them. The battle of Junín ranked in importance with those of Boyacá, Carabobo and Bomboná, as well as that of Pichincha, and had a marked effect on the ultimate success of the Peruvian campaign. The morale of the royalists was destroyed. Canterac, in his retreat, was forced to cover 450 miles of very rough country, and lost a large part of his army.

A festivity following this success was the occasion of generous words exchanged between the victor of Bomboná and the conqueror of Pichincha. Sucre said:

"Led by the Liberator, we can expect nothing but victory!"

to which Bolívar answered:

"To know that I will conquer, it is enough to know who are around me."

At another time, Bolívar reiterated his feelings in the following way: