After a few weeks' respite in Valparaiso, "Collingwood" sailed again, this time for Callao, the main port on the Peruvian coast, giving Markham his first experience of a country that would figure prominently in his later career. During the next two years "Collingwood" cruised in the Pacific, visiting the Sandwich Islands, Mexico, and Tahiti, where Markham attempted to assist the nationalist rebels against their French governor. On 25 June 1846, Markham passed the examination for midshipman, being placed third in a group of ten. The long periods spent in Chilean and Peruvian ports had also enabled him to learn Spanish.