On receiving information of the bad success of their father, Ferdinand and Pedro de Contreras were much chagrined, and rashly determined to revolt and seize the government of the province. They persuaded themselves with being joined by a sufficient force for this purpose, confiding in the advice and assistance of a person named Juan de Bermejo, and some other soldiers his companions, who had quitted Peru in much discontent against the president, for not having sufficiently rewarded them, in their own opinions, for their services in the war against Gonzalo. Besides these men, several of those who had fought under Gonzalo had taken refuge in Nicaragua, having been banished by the president from Peru, all of whom joined themselves to the Contreras on this occasion. By these people the young men were encouraged to erect the standard of rebellion, assuring them, if they, could pass over into Peru with two or three hundred men, sufficiently armed, that almost the whole population of the kingdom would join their standards, as all were exceedingly dissatisfied with the president for not rewarding their services sufficiently. The Contreras accordingly began secretly to collect soldiers, and to provide arms for this enterprize; and deeming themselves sufficiently powerful to set justice at defiance, they resolved to commence their revolt. As they considered the bishop of Nicaragua among the most determined enemies of their father, they began their operations by taking vengeance on him; for which purpose they sent some soldiers to his house, who assassinated him while playing chess. After this, they openly collected their followers and displayed their standard, assuming the title of the Army of Liberty; and seizing a sufficient number of vessels, they embarked on the Pacific Ocean with the intention of intercepting the viceroy on his voyage from Lima to Panama, intending to plunder him of all the treasure he was conveying to Spain. For this purpose they steered in the first place for Panama, both to gain intelligence of the proceedings of the president, and because the navigation from thence to Peru was easier than from Nicaragua.
Embarking therefore with about three hundred men, they made sail for Panama, and on their arrival at that place they learnt that the president had already disembarked with all his treasure and attendants. They now believed that every thing was favourable to their intentions, and that by good fortune their desired prey had fallen into their hands. Waiting therefore till night, they entered the port as quietly as possible, believing that the president was still in Panama, and that they might easily execute their enterprize without danger or resistance. Their intelligence however was exceedingly defective, and their hopes ill founded; for the president had left Panama with all his people three days before, having previously sent off all his treasure to Nombre de Dios, to which place he was likewise gone. In fact, by this diligence, the president avoided the impending danger, without having the slightest suspicion that any such might befal. Immediately on landing, the brothers were informed that the president had already left the place; on which they went to the house of Martin Ruiz de Marchena, treasurer of the province, where they took possession of the money in the royal coffers, amounting to 400,000 pesos in base silver, which had been left there by the president in consequence of not having sufficient means of transporting it to Nombre de Dios along with the rest. After this they dragged Marchena, Juan de Larez, and some other respectable inhabitants to the public square, threatening to hang them all unless they gave immediate notice where the arms and money belonging to the province were deposited. But all their threats were unable to force any discovery, and they carried on board their ships all the treasure and other valuable plunder they had procured.
Believing that the farther success of their enterprize depended on the diligence they should exert in reaching Nombre de Dios to surprize the president, before he might have time to embark or prepare for his defence, they determined to proceed to that place without delay. For this purpose, it was arranged that Ferdinand de Contreras should march to Nombre de Dios with the greater part of the troops, while Juan de Bermejo was to take post with an hundred men on a height near Panama, to protect the rear of Ferdinand, to prevent pursuit, to be in readiness to receive the valuable booty they expected, and to intercept such of the attendants on the president as might escape in that direction from Nombre de Dios. In the mean time, Pedro de Contreras was to remain on board with a small number of men to protect the ships. All this was done accordingly; but matters turned out in quite a different manner from their expectations. Marchena got some information respecting their plan of operations, and sent off two confidential intelligent negroes to give notice to the president of what had occurred in Panama, and of the ulterior designs of the Contreras. One of these negroes was directed to travel the whole way by land, and the other to go by way of the small river Chagre, which route had been taken by the president.
This river has its source in the mountains between Panama and Nombre de Dios. Its course at first seems tending towards the Pacific Ocean; but it suddenly makes a turn at a cataract, and after a farther run of fourteen leagues it falls into the Atlantic; so that by means of a canal only five leagues in length, from that river to the South Sea, a navigation might be easily established between the two seas. It is true that it would be necessary to cut this canal through mountains, and in a country exceedingly uneven and full of rocks, so that the design has hitherto appeared impracticable. Hence, in going from Panama to Nombre de Dios by the river Chagre, it is necessary to travel by land in the first place to that river below the fall, a distance of five leagues. After descending to the mouth of the river, there still remains five or six leagues to go by sea to Nombre de Dios. The messenger who was sent by this road came up with the president before his arrival at Nombre de Dios, and gave him an account of the events which had taken place at Panama. Though much alarmed by this intelligence, he communicated it to the provincial and the officers who accompanied him without appearing to be under any apprehensions; but, on embarking on the North Sea, it fell so dead a calm that they could make no progress, and he could not then conceal his fears of the event. Still however preserving his presence of mind, he sent off Hernan Nunnez de Segura by land to Nombre de Dios, accompanied by some negroes who knew the country, with orders for all the inhabitants of that place to take up arms for the protection of the treasure which had been sent there. Segura had a most difficult and fatiguing journey on foot, having several rivers to cross, some of them by swimming, and to pass through woods and marshes in a road through which no person had travelled for a long while. On his arrival at Nombre de Dios, he found the news already communicated to that place, by the other negro, and that the inhabitants were already in arms, and had prepared as well as they were able to defend themselves, having landed the crews of nine or ten vessels which were in the harbour to give their assistance in repelling the rebels. The president arrived shortly afterwards, where he found every thing in order for defence; and immediately marched out at the head of the armed inhabitants on the road towards Panama, determined to give battle to Contrera in case of his approach.