On September 8, 1820, the "Expedición Libertadora" of Peru, organized mainly by Argentinians and with some Peruvian and Chilean's government involvement, landed on the beach at Paracas Bay, near the city of Pisco. The land army was under the command of José de San Martín. after the navy under Thomas Cochrane defeated the navy of the Spanish empire on the Peruvian coasts and have control and surrender of Callao, After fruitless negotiations with the viceroy, the expedition occupied the Peruvian capital of Lima on July 21, 1821. The independence of Peru was proclaimed on July 28, 1821. Viceroy José de la Serna e Hinojosa, still in command of a sizable military force, retired to Jauja, and later to Cusco.