An important public health question is to determine the probabilities of perinatal HIV transmission and when it occurs, whether antepartum, intrapartum, or postpartum through breastfeeding. However, this is a difficult problem because the presence of HIV infection in an infant can only be ascertained through viral assays in the postpartum period. We propose a model that simultaneously estimates the risks of antepartum, intrapartum, and postpartum transmissions together with the sensitivity of the screening tests for HIV infection. The model allows estimating of infectivity through breast milk during postpartum periods. The methods are illustrated on a South African randomized clinical trial of extended AZT versus a short course of nevirapine in infants whose mothers had no access to antenatal antiretroviral therapy.