Size-assortative shoaling is a widespread phenomenon potentially linked to competition for resources among shoal members and anti-predator benefits gained from living in shoals. This paper investigates the influence of both factors on size-assortative shoaling in chub (Leuciscus cephalus). In a first experiment food competition was studied by manipulating the proportions of small and large chub in shoals of 20 fish. Large fish were generally more competitive than small ones. However, the competitive effect of large fish was strongly dependent on their number in the shoal. This has important consequences for the theory of competition because it makes it difficult to predict stable combinations of different phenotypes when foragers divide between food patches. Despite the strong effects of food competition no significant trend for size-assortativeness was observed in free-swimming shoals when undisturbed. This changed after the shoal had been frightened by introducing Schreckstoff (an alarm substance) to the test tank. Large and small fish still remained in the same shoal but showed a strong preference to be close to neighbours of their own size class. Large fish were observed mainly in the centre of the shoal and small fish were found more in the periphery. It is unclear whether these position differences are due to aggressive behaviour of large fish towards small fish which excludes them from the potentially safe centre of the shoal. These results indicate that prédation plays a more important role than food competition for size-assortative shoaling in chub.