Oil palm production in Indonesia illustrates the intense pressure that exists worldwide to convert natural ecosystems to agricultural production. Oil palm production has increased because of expansion of cultivated area rather than due to average-yield increases. We used a data-rich modelling approach to investigate how intensification on existing plantations could help Indonesia meet palm oil demand while preserving fragile ecosystems. We found that average current yield represents 62% and 53% of the attainable yield in large and smallholder plantations, respectively. Narrowing yield gaps via improved agronomic management, together with a limited expansion that excludes fragile ecosystems, would save 2.6 million hectares of forests and peatlands and avoid 732 MtCO2e compared with following historical trends in yield and land use. Fine-tuning policy to promote intensification, along with investments in agricultural research and development, can help reconcile economic and environmental goals.