Foreign firms operating in emerging markets are commonly assumed to outperform their local competitors and thereby pose a serious threat to domestic firms. In most cases, the superiority of foreign firms can be attributed to their higher firm specific advantages like technical or marketing skills, and capital access. In this paper the authors argue that domestic firms can compensate their lack of firm specific advantages by their capabilities to deal with the imperfect institutional environment in emerging markets. Using data from 87 developing countries they show that the performance of foreign and domestic firms significantly differ under different grades of institutional stability, embeddedness in the economy and the motives for investment. They identify factor combinations where domestic firms outcompete their foreign competitors.