A fundamental attribute of social intelligence is the ability to monitor third-party relationships, which has been repeatedly demonstrated in primates, and recently also in captive ravens. It is yet unknown how ravens make use of this ability when dealing with different types of social relationships simultaneously during complex real-life situations. Free-ranging non-breeder ravens live in societies characterized by high fission-fusion dynamics and structured by age, pair-bond status and kinship. Here, we show that free-ranging ravens modify communication during conflicts according to audience composition. When being attacked by dominant conspecifics, victims of aggression signal their distress via defensive calls. Victims increased call rates when their kin were in the bystander audience, but reduced call rates when the bystanders were bonding partners of their aggressors. Hence, ravens use social knowledge flexibly and probably based on their own need (i.e. alert nearby allies and avoid alerting nearby rivals).