Background: Maternal use of antibiotics during pregnancy has been associated with the development of asthmatic disorders in the offspring. The human microbiome has been suggested to act as an intermediary in this process. To provide clarification on this theory, we studied the temporal relation between maternal use of antibiotics and the risk of childhood asthma. Methods: According to national registries, during the observation period (1997-2010), 910 301 children were born in Denmark and were included in the analysis. From these registries, data for cases of childhood asthma were obtained based on hospital admissions, outpatient attendance at a hospital, or use of inhaled corticosteroids. The effect of timing of maternal antibiotic use on the risk of asthma in the offspring was studied by analysis of maternal antibiotic use in the 80 weeks before pregnancy, during pregnancy, and the 80 weeks after pregnancy. Results were adjusted for age and calendar year, birthweight, gestational age, sex, mode of delivery, parity, multiple births, season of birth, and several maternal factors (age, smoking during pregnancy, employment status, and asthma). Findings: In this study, we replicated our previous finding that maternal use of antibiotics in pregnancy was associated with an increased risk of childhood asthma: the adjusted incidence rate ratio (aIRR) was 1·24 (95% CI 1·18-1·30) for inpatient admission, 1·22 (1·18-1·26) for outpatient attendance, and 1·18 (1·15-1·20) for inhaled corticosteroid use. A similar and independent association was also recorded for maternal antibiotic use in the 80 weeks before and after the pregnancy. A dose-related association occurred between the risk of childhood asthma and the number of maternal antibiotic treatments and was recorded separately for antibiotic treatment for respiratory tract infections and for other types of infections. Interpretation: Maternal use of antibiotics has a dose-related association with the risk of asthma in the offspring, but this association is independent of the temporal relationship with the pregnancy period. This finding suggests that maternal antibiotic use is a surrogate marker of a mother's general propensity for infections as the underlying link between a mother's use of antibiotics and risk of asthma in the offspring. Funding: The Danish Council for Strategic Research, The Lundbeck Foundation, The Pharmacy Foundation of 1991, the Danish Medical Research Council, and National Finance Act.