In a model of a joint venture between a local and a foreign firm who provide complementary inputs, this paper derives optimal ownership structures under different sharing rules. The local firm's profits may be maximized by assigning a majority share to the foreign firm. Efficiency (i.e., the minimization of double moral hazard) requires that the firm with the more productive input should get majority ownership. When only the foreign firm can upgrade its input, it should receive a larger share than what it receives in the absence of upgrading. The analysis implies that a blanket policy of prohibiting majority foreign ownership is theoretically unfounded.