The tendency for human beings, economic firms and social institutions to locate together has been the subject of intellectual inquiry for centuries. People and firms are not spread ubiquitously across the globe but have a powerful tendency to organize in well-defined geographic units, cities. First Auerbach (1913) and then Zipf (1941; 1949) observed a striking regularity in this process, noting the distribution in cities is highly skewed and follows a simple “rank-size rule” (Zipf’s law). Despite considerable research on these issues, there does not as exist an explanation for Zipf’s law based on behaviorallycredible micro-foundations. This article offers such a model, using the fact that business firms also have Zipf distributed sizes. The basic model is simple: people form together in firms, and firms co-locate. The agents in the model have heterogeneous abilities, exhibit bounded rationality, and interact directly with one another out of equilibrium in team production environments. Each agent is part of a firm and each firm has a spatial location. Agents periodically search for positions in other firms that would give them higher payoffs. Agents can also start-up new firms, at either their current location or a new location. Over time the movement of individual agents across firms combines with the movement of firms across locations to yield clusters of agents and firms. From these basic micro-foundations the model reproduces, under a wide range of conditions, a distribution of cities that follows Zipf’s law. This model constitutes the first behaviorally-plausible, microscopic explanation of the city size distribution, on the one hand, and the mutual existence of Zipfian firm and city sizes on the other.