Moonrats inhabit most jungle terrain in southern Myanmar, Peninsular Thailand, Peninsular Malaysia, Borneo and Sumatra. Although they are closely related to the short-tailed gymnure and to the hedgehog, full grown specimens more closely resemble large rats, with which they share similar habits and ecological niches. Moonrats are nocturnal and terrestrial, lying up under logs, roots or in abandoned burrows during the day. They inhabit moist forests including mangrove and swamp forests and often enter water. They feed on earthworms and various small animals, mostly arthropods. Moonrats release strong odours with a strong ammonia content to mark the edges of their territories and warn other moonrats to stay away with threatening hisses also to ward off predators. Adults live alone.