According to Encyclopædia Iranica, after arriving in England, he later served abroad in South Africa and British India. According to "Alma Mater," which does not contain any reference to his travels to England, Africa or India, in 1797 he joined the Polish Legions in Italy, and was part of the Polish contingent sent to quell the Haitian Revolution in 1802. Like many Poles who disliked quelling an independence movement, he then deserted the French side, and he himself joined the buccaneer organization Brethren of the Coast. Around 1805–1806 he joined a group of South American freedom fighters under Francisco de Miranda, and around 1810 he became one of the trusted lieutenants and later an adiutant of Simón Bolívar. He was one of Bolivar's commanders during the campaign to liberate New Granada of 1819–1820, distinguishing himself in the Crossing of the Andes and the Battle of Boyacá, and in 1821, at the Battle of Carabobo. Following the establishment of Gran Colombia, he lived in Bogotá for at least two years, but political intrigues resulted in his decision to leave South America. He visited the United States and then traveled to the Middle East, where he worked for Muhammad Ali of Egypt and taught mathematics and English.