How do severe shocks, such as war alter the economy? We study how a country’s production network is affected by a devastating but localized conflict. Using unique transaction-level data on Ukrainian railway shipments, we uncover several novel indirect effects of conflict on firms. First, we document substantial propagation effects on interfirm trade—trade declines even between partners outside the conflict areas if one of them had traded with those areas before the start of the war. The magnitude of the second-degree effect of conflict is one-third of the first-degree effect. Ignoring such propagation would lead to an underestimate of the total impact of conflict on trade by about 67%. Second, war induces sudden changes in the production network structure that influence firm performance. Specifically, we find that firms that exogenously became more central after the conflict practically cut off certain regions from the rest of Ukraine received a relative boost to their revenues and profits. Finally, in a production networks model, we separately estimate the effects of the exogenous firm removal and the subsequent endogenous network adjustment on firm revenue distribution. At the median, network adjustment compensates for 66% of the network-destruction effect a year after the conflict onset and for all of it, two to three years removed.