Previous research has found that weak institutions can hamper investment and alter patterns of trade. However, little is known about the impact of institutional quality on offshoring. This lack of knowledge is surprising, given that offshoring has become an important part of many firms’ internationalization strategies. This study uses detailed firm-level data for the period 1997-2005 to examine the relationship between institutional quality in 113 source countries and offshoring by Swedish firms. The results suggest that weak institutions are negatively related to offshoring in general and to offshoring of R&D- and relationship specificity-intensive inputs in particular. Analysis of learning effects suggests that the impact of weak institutions on offshoring of relationship specificity-intensive inputs vanish when firms return to countries from which they have previous market experience. Our results are robust to various measures of institutional quality.