The government contracts with a foreign firm to extract a natural resource that requires an upfront investment and which faces price uncertainty. In states where profits are high, there is a likelihood of expropriation, which generates a social cost that increases with the expropriated value. In this environment, the planner's optimal contract avoids states with high probability of expropriation. The contract can be implemented via a competitive auction with reasonable informational requirements. The bidding variable is a cap on the present value of discounted revenues, and the firm with the lowest bid wins the contract. The basic framework is extended to incorporate government subsidies, unenforceable investment effort and political moral hazard, and the general thrust of the results described above is preserved.