In June 1828, Gran Colombia declared a state of war on Peru under allegations that it had fomented a rebellion against Colombian forces in Bolivia.
Gran Colombia's leader, Simon Bolivar, also demanded the payment of a debt of several million pesos resulting from the Peruvian War of Independence; and the cession of the northern provinces of Jaén and Maynas.
On 31 August 1828, the Peruvian vessel was intercepted by two Gran-Colombian warships, the schooner Guayaquileña and the corvette Pichincha, commanded by Irish-born Captain Thomas C. Wright.
On 8 January 1828, the Commander-in-Chief of the Peruvian Navy, Rear Admiral José Pascual de Vivero, established a budget of 7,354 pesos to convert the Libertad into a warship, initially armed with 22 12-pounder guns taken from the corvette Limeña.
Among the officers on board were two future Ecuadorian presidents, ensign José María Urvina and midshipman Francisco Robles.