Sun bears are found in Southeast Asia, primarily in forested areas of countries such as Indonesia, Malaysia, Thailand, and Cambodia. They prefer lowland tropical rainforests, but can also be found in other forest types such as mangrove forests and bamboo forests. Sun bears have a wide range, but their population has been declining due to habitat loss from deforestation, as well as hunting for their body parts, which are used in traditional medicine and as luxury goods. Conservation efforts are in place to protect sun bears and their habitats.