We study the total effect of the mobility of R&D workers on the firm that they join and the firm that they leave.•We document not only positive effects of R&D workers joining from other firms (in particular from those firms that are patent-active) but also of workers who have left the firm to join a patent-active new employer.•We hence find evidence for positive effects of mobility on innovation and, in particular, for labor mobility increasing the total innovative activity of the firms involved in the mobility event.•The interpretation of our findings as resulting from knowledge transfer is backed up by analysis of citations patterns between firms showing that the probability that firm A cites firm B (and vice versa) increases if there have been labor flows between these firms.•We thereby provide micro-level evidence for labor mobility stimulating the overall innovative activity of countries or regions through knowledge spillovers. We investigate the effect of mobility of R&D workers on the total patenting activity of their employers. Our study documents how mobile workers affect the patenting activity of the firm they join and the firm they leave. The effect of labor mobility is strongest if workers join from patent-active firms. We also find evidence of a positive feedback effect on the former employer's patenting from workers who have left for another patent-active firm. Summing up the effects of joining and leaving workers, we show that labor mobility increases the total innovative activity of the new and the old employer. Our study which is based on the population of R&D active Danish firms observed between 1999 and 2004 thus provides firm-level support for the notion that labor mobility stimulates overall innovation of a country or region due to knowledge transfer.