The present paper studies the factor content of heterogenous firm trade in the presence of market imperfections and transaction costs. The conceptual framework builds on a relative factor endowment model, which we extend to account for firm heterogeneity and transaction costs. Using a large panel of firm-level data for the EU, we are able to examine not only the aggregate factor content of trade but also to identify differences in the factor of trade between heterogenous firms. Our empirical results suggest that because of transaction costs and market imperfections, the factor content of agricultural trade is heavily distorted in the CEE transition economies. To increase the gains of trade and the employed factor rewards, the policy should first address the transaction costs and market imperfections.