Abstract Previous studies suggest the physical structure of a habitat has profound effects on intraspecific competition and spacing behaviour among small mammals. We compared habitat preferences and the exploratory behaviour and aggressive territorial defence of male house mice in three types of enclosure differing only in their degree of structural complexity. Each enclosure contained a nestbox placed in one corner, a central food hopper and 10 house bricks. The bricks were either placed around the outer walls (open enclosures), lined up across the middle (wall enclosures) or scattered separately across the floor (complex enclosures). In pairwise choice tests, mice showed a strong preference for wall or complex enclosures over open enclosures but no preference between wall and complex enclosures. They were more active throughout the enclosure with complex structuring and stayed near the side walls in open enclosures. Residents in open enclosures initially showed a lower rate of attack and duration of pursuit when faced with an intruder but not when faced with a second intruder. In complex enclosures, nearly all encounters ended because the residents continued pursuit but lost track of the intruder. This occurred in only half of intruder pursuits in open and wall enclosures. Our results suggest that mice prefer areas containing physical structure because this provides a degree of protection from predators but territories with complex physical structuring appear to be much more difficult to defend. Complex areas may thus support a higher density of mice than open areas or those with more simply aligned physical structuring.