In the East Indies[edit]
Crawfurd was sent in 1808 to Penang, where he applied himself to the study of the Malay language and culture.[1] In Penang he met Stamford Raffles for the first time.
In 1811, Crawfurd accompanied Raffles on Lord Minto's Java Invasion, which overcame the Dutch.[2] Raffles was appointed Lieutenant-Governor of Java by Minto during the 45-day operation, and Crawfurd was appointed the post of Resident at the Court of Yogyakarta in November 1811. There he took a firm line against Sultan Hamengkubuwana II. The Sultan was encouraged by Pakubuwono IV of Surakarta to assume he had support in resisting the British; who sided with his opponents his son the Crown Prince and Pangeran Natsukusuma.[4] The Sultan's palace, the Kraton Ngayogyakarta Hadiningrat, was besieged and taken by British-led forces in June 1812.[5]