Abstract Social foraging allows individuals to scrounge, i.e. to exploit the food others have made available. The conditions promoting scrounging as an alternative foraging tactic have yet received limited attention. We presently examine whether ravens, as opportunistic scavengers, adjust their foraging tactics according to the potential costs involved in accessing a particular food source. We observed wild ravens foraging in a game park, at the enclosures of wolves, Canis lupus, and wild boars, Sus scrofa. Wolves may aggressively defend their food and even kill ravens, whereas wild boars do not. When co-feeding with wolves, the ravens showed higher scrounging rates than with wild boars. Only at the wolves, they tended to specialize either on scrounging or on getting food directly from the site. However, scrounging techniques differed in relation to the state of food depletion. Early on, after food became available, the ravens most frequently displaced others from food, whereas towards the end, stealing, solicited sharing, and cache raiding became prevalent. These techniques differed in their profitability and their use was related to the scroungers’ age, social status and affiliative relationships. This suggests that ecological conditions, such as co-feeding with potential predators, may influence the individuals’ decision whether or not to scrounge in competition for food. Social conditions, on the other hand, may affect the way how to get at food possessed by others and may thus, to a large extent, determine the profitability of scrounging.