SUMMARY1. Dragonfly assemblages (Odonata: comprising damselflies, Zygoptera; and dragonflies, Anisoptera) in Southeast Asian rainforests are extremely diverse but increasingly threatened by habitat disturbance, including logging and conversion of forest to oil palm plantations. 2. Land-use change can affect dragonfly larval stages by altering within-stream environmental conditions, and adults by loss of perches, shade and hunting habitat. However, the extent to which dragonflies are affected by land-use change is not well known, and strategies for conservation are poorly developed. 3. We surveyed dragonfly adults and larvae, forest quality and stream environmental conditions across 16 streams in Sabah, Malaysia. Habitat surrounding the streams included pristine forest, selectively logged forest, oil palm with forested riparian buffer strips and oil palm without buffers. 4. Overall abundance and species richness of adult dragonflies stayed constant with habitat disturbance, but larval abundance and richness decreased with higher habitat disturbance, and larvae were largely absent from oil palm streams. There was also a clear shift in community composition of both adult and larval dragonflies. Anisoptera adults were more species rich and abundant, but Zygoptera adults were less species rich in more disturbed sites. 5. The presence of riparian buffers in oil palm plantations offered some protection for forest-associated dragonfly species, and streams with wider riparian buffers supported adult assemblages more similar to those found in logged forest. However, oil palm streams with riparian buffers still contained a depauperate larval assemblage compared to logged forest areas, and dragonfly assemblages in narrow riparian buffer streams were similar to those found in streams surrounded by continuous oil palm. 6. Our results provide clear evidence of the effect of land-use change on dragonflies. Conservation efforts to conserve forest communities should target the preservation of existing forest areas, but management within oil palm plantation landscapes to preserve riparian buffers can still have a marked beneficial effect on dragonfly communities.