Introduction: The virtual elimination of mother-to-child transmission of HIV cannot be achieved without complete maternal HIV testing. The World Health Organization recommends that women in high HIV prevalent settings repeat HIV testing in the third trimester, and at delivery or directly thereafter. The Western Cape Province (South Africa) prevention of mother-to-child transmission (PMTCT) guidelines recommend a repeat maternal HIV test between 32 and 34 weeks gestation and at delivery in addition to testing at the first antenatal visit (ideally 5 days before delivery. We defined early ANC attendance as ≤22 weeks gestation. We deemed all women eligible for an initial test if on their first visit, whether antenatally or at delivery, they were not already known to be HIV positive; and eligible for repeat testing if they had not had a prior positive antenatal HIV test. Tests were considered to be retests if women underwent an HIV test within the third trimester and/or at delivery following a prior negative HIV test. We considered women eligible for retesting in the third trimester if they delivered >35 weeks gestation. According to the guidelines there was no minimum time period between tests. The primary outcome was receipt of an HIV test (yes/no): (1) at first visit (ideally ≤22 weeks, but up to delivery); (2) in the third trimester as a repeat test; and (3) at delivery as a repeat test. The secondary outcome was HIV‐positive diagnoses (yes/no) at each test. We calculated testing completion at: Women who tested at first ANC visit were also categorized as having tested <28 weeks gestation, in the third trimester and/or at delivery. Testing completion at each recommended window was calculated only among women eligible to be tested at that respective window (Figure (Figure1;1; Table Table22 – column 1). Data abstracted from the e‐register did not record ANC visits between the first visit and delivery unless a test was recorded. Eligibility for repeat testing in the third trimester was hence based on prior ANC attendance. Flow chart illustrating the number of women eligible to be HIV tested within each testing point window. Only women for whom gestational age was available were included (n = 6917). aWomen who HIV tested <28 weeks gestation but delivered ≤35 gestation in the third trimester and therefore would not be eligible for repeat testing in the third trimester. bWomen who delivered prematurely were considered eligible for testing at delivery if not yet diagnosed HIV positive. HIV testing during pregnancy for women for whom gestational age data were available (n = 6917) ANC, antenatal care; n, number of participants. In addition, we calculated the testing completion restricted to the windows defined in the PMTCT guidelines (best practice) as follows: Individuals diagnosed HIV positive during the study period were coded as “diagnosed at enrolment” if they tested HIV positive at their initial ANC test, or as “seroconverts” if they tested HIV‐positive after a previous negative antenatal HIV test. We categorized women as having an “uncertain HIV status at delivery” if they tested HIV negative at least once during ANC but had not received a test within three months prior to or at delivery; and having an “unknown HIV status at delivery” if they never tested during the current pregnancy. For women with two pregnancies within the study period, we included the pregnancy for which most data were available. Premature delivery was defined as delivery <37 weeks gestation. Data analysis was carried out using Stata version 13.0 (Stata Corporation, College Station, Texas, USA). Differences between the characteristics of all participants, stratified by HIV status post delivery, were assessed using the two‐sample t‐test (normal distribution) or the Wilcoxon rank‐sum test (non‐normal distribution) for numerical data and the χ2 or Fishers Exact test for categorical data. A descriptive analysis (proportions) was used to assess HIV testing completion during pregnancy among participants for whom gestational age data was available. We used logistic regression to assess predictors of maternal HIV testing completeness. Multivariable models included several variables selected a priori as being possible risk factors (age at enrolment, gravidity, and year of enrolment) for the outcome. Additional variables were included by sequentially adding them based on univariable analysis of significance. Those that were either significantly associated with the outcome of interest after adjustment for other variables (p < 0.05) or that altered the odds ratios (ORs) for other variables in the model by ≥10% were retained 32. The University of Cape Town Human Research Ethics Committee and the Provincial Government of the Western Cape Department of Health Research Committee approved the study. The CTG study was granted a waiver of informed consent for the e‐register as all data had already been collected routinely by health services. No participant recruitment was required.