The objective of this study was to estimate the impact of somatic cell count (SCC) in early lactation (SCCel) [measured between 5 to 14 d in milk (DIM)] of dairy heifers on test-day milk yield (MY) during the first lactation. In total, 117,496 four-weekly test-day records of 14,243 heifers were used. A multilevel regression analysis, which included test-day SCC among the explanatory variables, revealed that an increase by one unit of the natural log-transformed SCCel (LnSCCel) was on average associated with a decrease in MY of 0.13 kg/d later in lactation. As an example, a heifer with an SCCel of 50,000 cells/mL measured at 10 DIM was estimated to produce 119 and 155 kg more milk during its first lactation than heifers with a SCCel of 500,000 and 1,000,000 cells/mL, respectively. When not accounting for test-day SCC, the effect of LnSCCel on MY was larger, indicating that part of the negative impact of elevated SCCel was associated with elevated test-day SCC later in lactation.Furthermore, an elevated SCCel at 14 DIM had a larger impact than an equally elevated SCCel measured at an earlier DIM. In addition, the negative effect of an elevated SCCel remained present during almost the entire first lactation in a subgroup of heifers with a second test-day SCC </=50,000 cells/mL, suggesting that prevention rather than cure of an elevated SCCel should be preferred. This study stresses the importance of heifers having low SCCel, as an elevated SCCel will negatively affect milk production during the first lactation, probably via impairment of mammary function and, to a smaller extent, via elevated test-day SCC later in lactation.