Firms use relational contracts to support repeated trade. Do these informal agreements evolve in response to market conditions? In a market for ice, firms reestablish relationships on new terms when a prior agreement breaks down. Using transaction data, we show that ice retailers prioritize deliveries to loyal buyers— fishing firms— when supply from the monopolistic manufacturer is scarce. After an upstream shock to competition increases supply, repeated trade lapses, threatening retailers’ positions. Incumbent retailers establish a new agreement expanding trade credit to loyal buyers, which impedes new retailer entry. Upstream competition also increases downstream firms’ productivity and lowers consumer fish prices.