Background. On 26 March 2020, the South African (SA) government initiated a 21-day national level 5 lockdown which was subsequently eased off and downgraded to level 4 on 1 May and to level 3 on 1 June. The effect of lockdown measures on SARS-CoV-2 infectivity is currently uncertain. In this article, we analyse the effects of the lockdown measures on the SARS-CoV-2 epidemic in one of the epicentres in SA. Objectives. To measure the effects of lockdown measures introduced in SA on SARS-CoV-2 attack rates (ARs, the percentage of individuals who tested positive in a specified time period) in Gauteng Province during a 4-month period (March - June 2020). Methods. In this retrospective cohort study, we used a comprehensive database from an independent pathology laboratory in Gauteng. We analysed trends of positivity rates of reverse transcription polymerase chain reaction tests done during the 4-month period. The ARs are reported over time (unweighted and age-weighted 14-day moving averages) by age groups, gender, and different regions/districts in Gauteng. Results. A total of 162 528 tests were performed at a private laboratory between 5 March and 30 June 2020, of which 20 574 were positive (overall AR 12.7%). These positive tests constituted 44.8% of all positive cases in the province (20 574/45 944). Sixty-two percent of all tests were done in June during lockdown level 3. There was an exponential increase in the AR in June (18.3%) when lockdown was eased to level 3, in comparison with 4.2% (March), 2.2% (April) and 3.3% (May). The increase in June was seen in all the age groups, although it was more pronounced in the 21 - 60 years age groups than the younger (0 - 20 years) and older (>60 years) age groups. The AR was significantly higher in males (13.2%) compared with females (12.1%) (χ2 test, p<0.0001). Conclusions. The findings of this study testify to the rapid increase in ARs resulting from easing of the lockdown regulations, especially to level 3 in June. Of concern is the upward trend in the AR across all age groups, especially <20 years (15.9%), which was not reported in other parts of the world. Population age dynamics should therefore be considered when taking future decisions about lockdown regulations.