Genetic parameters for somatic cell score (SCS) for Polish Black-and-White cattle were estimated using 52,599 test day records from the first six lactations of 8,418 cows, and the Bayesian method via Gibbs sampling. The two-trait random regression (RR) model included fixed herd-yearmonth of test effect, fixed regressions within genetic group by age at calving by season of calving subclasses, and random regressions for additive genetic and permanent environment effects. First and subsequent lactations were treated as separate traits. Fourth-order Legendre polynomials were used for regressions. There were 200,000 samples of (co)variances for random effects generated with the first 20,000 samples as the burn-in period.Genetic variances were in the range of 0.37 to 0.76 throughout first parity and 0.43 to 0.91 throughout later parities, with averages of 0.41 and 0.48, respectively. Variances for permanent environment increased from 1.04 to 1.37 throughout the first, and from 1.11 to 2.00 throughout subsequent parities. Estimates of heritabilities were from 0.11 to 0.20 for first and 0.13 to 0.22 for subsequent lactations, indicating stronger genetic resistance to mastitis in later parities. The highest values of heritability were observed at peripheries. Genetic correlations for SCS between first and later parities for different days in milk (DIM) were all less than 0.5, with the highest values in midlactation.