When chemotactic strains of the bacterium Escherichia coli are inoculated on semi-solid agar containing mixtures of amino acids or sugars, the cells swarm outwards in a series of concentric rings: they respond to spatial gradients of attractants generated by uptake and catabolism. Cells also drift up gradients generated artificially, for example by diffusion from the tip of a capillary tube or by mixing. Here we describe conditions under which cells aggregate in response to gradients of attractant which they excrete themselves. When cells are grown in semi-solid agar on intermediates of the tricarboxylic acid cycle, they form symmetrical arrays of spots or stripes that arise sequentially. When cells in a thin layer of liquid culture are exposed to these compounds, spots appear synchronously, more randomly arrayed. In either case, the patterns are stationary. The attractant is a chemical sensed by the aspartate receptor. Its excretion can be triggered by oxidative stress. As oxygen is limiting at high cell densities, aggregation might serve as a mechanism for collective defence.