In labor markets with worker and firm heterogeneity, the matching between firms and workers may be assortative, meaning that the most productive workers and firms team up. We investigate this with longitudinal population-wide matched employer-employee data from Portugal. Using panel data methods, we quantify a firm-specific productivity term for each firm, and we relate this to the skill distribution of workers in the firm. We find that there is positive assortative matching, in particular among long-lived firms. Using skill-specific estimates of an index of search frictions, we find that the results can only to a small extent be explained by heterogeneity of search frictions across worker skill groups. © 2010 Elsevier B.V.