The effects of witnessing community violence on aggressive cognitions and behavior were investigated in an ethnically diverse sample of 4,458 children living in urban neighborhoods. Prior violence exposure had a significant effect in increasing aggression, normative beliefs about aggression, and aggressive fantasy. Although exposure to violence predicted aggressive behavior both in Grades 1 through 3 (ages 5-8) and Grades 4 through 6 (ages 9-12), the effects on social cognition were only evident in the later grades. Furthermore, the effect of violence exposure on aggression in the later grades was partially mediated by its effect on social cognition. These findings suggest that witnessing community violence has an effect on children's aggressive behavior through both imitation of violence and the development of associated cognitions as children get older.