The aims of this study were to investigate the roosting ecology and social organization of the spotted-winged fruit bat, Balionycteris maculata (Megachiroptera), within an old-growth Malaysian dipterocarp forest, and test the hypothesis that males spend a significantly greater proportion of the night in the immediate vicinity of their day roosts than females. Balionycteris maculata roosted in cavities and formed small harem groups that consisted of one adult male accompanied by up to nine adult females and their dependent young. Both male and female bats foraged locally, within approximately 1 km of their roost sites. However, in contrast to females, which remained away from the roost site throughout the night, both harem and solitary adult males divided their nightly activity between foraging and returning to their roost sites. Individual females were also found roosting sequentially with up to three different males. Hence, these results suggest that B. maculata has a resource-defence polygynous mating system, in which the roost cavity may represent a critical and defendable resource by which males recruit and gain improved reproductive access to females. Roost cavities occupied by B. maculata were found within a number of different forest structures, including ant nests, termite nests and the root masses of epiphytes. The consistent shape and position of the cavities, along with a single observation of cavity enlargement, provide the first evidence of roost-cavity excavation, by a megachiropteran bat, within the nests of social insects. Although the cues by which females select their roost sites are unclear, some aspect of roost cavity size, or condition, may provide a possible means by which females can assess the reproducÍtive fitness of potential mates.