 General San Martín named Guido as Lieutenant Colonel, but he continued doing the job of Chief Secretary of the Army and Navy.During the ceremony to mark the official declaration of Chilean independence on February 12, 1818, Guido played the role of flagbearer.Guido then worked as a diplomat for San Martín during the effort to liberate Peru, he negotiated with the Spanish Viceroy at Miraflores before San Martín declared Peruvian Independence on July 28, 1821.