Exploiting a unique empirical setting, 1,000 vendors in 90 traditional food markets in Lima, we document that historic social ties among market founders are associated, decades later, with stricter formal (third party) enforcement of market rules, more collective action, and the greater resilience of market sales to the entry of modern supermarkets. Markets with stronger historic ties make larger investments in market infrastructure, provide more services to market vendors, and exhibit more regular payment of dues. They also experienced higher growth over the period 2007-2017, following the entry of modern supermarkets. Formal enforcement appears to be a key mechanism through which social ties induce greater collective action: the component of formal enforcement that is explained by historic social ties is even more strongly correlated with collective action and growth. In contrast, differences in informal social enforcement are not correlated with any market outcomes. Neither is it the case that formal rules and governance structures can account for these results: these are identical across markets.