A unilateral policy intervention by a country (such as the introduction of an emission price) can induce firms to relocate to other countries. We analyze a dynamic game where a regulator offers contracts to avert relocation of a firm in each of two periods. The firm can undertake a location-specific investment (e.g., in abatement capital). Contracts can be written on some contractible productive activity (e.g., emissions), but the firm's investment is not contractible. A moral hazard problem arises under short-term contracting that makes it impossible to implement outcomes with positive transfers in the second period. The regulator resorts to high-powered incentives in the first period. The firm then overinvests and a lock-in effect prevents relocation in both periods. Paradoxically, the distortion in the firstperiod contract can be so severe that higher transfers are needed to avert relocation compared to a (hypothetical) situation without the investment opportunity