This paper considers a Hotelling duopoly with two firms A and B in the final good market. Both A and B can produce the required intermediate good, firm B having a lower cost due to a superior technology. We compare two contracts: outsourcing (A orders the intermediate good from B) and technology transfer (B transfers its technology to A). First we show that an outsourcing order acts as a credible commitment on part of A to maintain a certain market share in the final good market. This generates an indirect Stackelberg leadership effect, which is absent in a technology transfer contract. We show that compared to the situation of no contracts, there are always Pareto improving outsourcing contracts but no Pareto improving technology transfer contracts. Finally, it is shown that whenever both firms prefer one of the two contracts, all consumers prefer the other contract.