We present a dynamic model where the probability of outsourcing production is increasing in the firm's expectation of technological change. As the pace of innovations in production technologies increases, the less time the firm has to amortize the sunk costs associated with purchasing and adopting new technologies to produce in-house. Therefore, purchasing from market suppliers, who can afford to use the latest technology, becomes relatively cheaper. The predictions of the model are tested using a panel dataset on Spanish firms for the time period 1990 through 2002. In order to address potential endogeneity problems, we use an exogenous proxy for technological change, namely the number of patents granted by the U.S. patent office classified by technological class. We map the technological classes to the Spanish industrial sectors in which the patents are used and provide causal evidence of the impact of expected technological change on the likelihood and extent of production outsourcing. No prior study has been able to provide such causal evidence. Our results are robust to the inclusion of detailed characteristics of the firms as well as firm fixed effects.