I develop a model of endogenous production network formation between spatially distant firms. Unlike other such models, it is tractable even for very large numbers of firms, that is, it delivers closed-form predictions for firm-to-firm trade, it can be estimated via maximum likelihood, and it can be used for firm-level counterfactual analysis. I exploit novel micro-data on Indian firm-to-firm production networks for estimation. The estimated model implies that upon market integration across Indian states, over half of the variation in changes in firms’ sales to other firms can be explained by endogenous changes in network structure.