Individuals in many species increase their proximity to others in threatening situations (defensive aggregation), increasing their chance of survival and reducing the adverse psychological impact of stressors. However, the basic neurobiology of defensive aggregation is not well understood. Here we examined the role of the social neuropeptides oxytocin (OT) and vasopressin (AVP) in this response. Groups of rats were exposed to a ball of cat fur (an innate threat stimulus) in a large arena, causing prolonged periods of tight social grouping (huddling). The modulatory effects of OT and AVP on huddling were examined both alone and in conjunction with relevant antagonists. To determine specificity of treatment effects to social grouping, the effects of the same treatments were also assessed in individual rats exposed to cat fur and given the opportunity to hide. OT (0.5 mg/kg, i.p.) and AVP (0.01 mg/kg, i.p.) increased huddling in rats socially exposed to cat fur, whereas the selective V1A AVP receptor antagonist SR49059 (3 mg/kg, i.p.) decreased huddling. The effects of OT were prevented by pre-treatment with SR49059 (3 mg/kg), while those of AVP were prevented by the V1B receptor antagonist SSR149415 (30 mg/kg, i.p.). OT had no effect on huddling when groups of four rats were tested with no cat fur present whereas AVP increased huddling under these conditions. Neither OT, nor SR49059, affected hiding in individual rats exposed to cat fur. However, AVP increased hiding, an effect prevented by SSR149415 (30 mg/kg, i.p.). These results suggest that OT acts on V1A receptors to promote a social response to threat without altering the more general defensive response. Conversely, AVP appears to increase generalised anxiety via V1B receptors, which subsequently results in huddling. A hitherto unrecognised function of oxytocin is therefore to promote social affiliation during threatening situations.