1. We examined compromises between defence of nests against predation and ventilation of eggs in the common goby (Pomatoschistus microps). Females are known to prefer nests with small entrances, which are less vulnerable to predatory shore crabs, Carcinus maenus. However, small nest entrances may hamper egg ventilation by males. This may be especially detrimental under conditions of low dissolved oxygen. 2. Males did not make smaller entrances to their nests when in the presence of predatory crabs, but they had larger entrances under low oxygen than in normal oxygen levels. 3. Males diverted time from ventilating nests to attacking crabs. 4. Thus, males exchanged direct care of the eggs for protection against predators by reducing their fanning activity, but not according to needs of their eggs for oxygenation. This trade-off may therefore impose a greater cost to egg survival for males in low oxygen.