We prospectively studied the consequences of extensive antibiotic treatment on faecal carriage of antibiotic-resistant enterobacteria in a cohort of children with cystic fibrosis (CF) and a cohort of children with cancer compared to healthy children with no or low antibiotic exposure. The study was conducted in Norway in a low resistance prevalence setting. Sixty longitudinally collected faecal samples from children with CF (n = 32), 88 samples from children with cancer (n = 45) and 127 samples from healthy children (n = 70) were examined. A direct MIC-gradient strip method was used to detect resistant Enterobacteriaceae by applying Etest strips directly onto agar-plates swabbed with faecal samples. Whole genome sequencing (WGS) data were analysed to identify resistance mechanisms in 28 multidrug-resistant Escherichia coli isolates. The prevalence of resistance to third-generation cephalosporins, gentamicin and ciprofloxacin was low in all the study groups. At inclusion the prevalence of ampicillin-resistant E. coli and trimethoprim-sulfamethoxazole-resistant E. coli in the CF group compared to healthy controls was 58.6% vs. 28.4% (p = 0.005) and 48.3% vs. 14.9% (p = 0.001), respectively, with a similar prevalence at the end of the study. The prevalence of resistant enterobacteria was not significantly different in the children with cancer compared to the healthy children, not even at the end of the study when the children with cancer had been treated with repeated courses of broad-spectrum antibiotics. Children with cancer were mainly treated with intravenous antibiotics, while the CF group mainly received peroral treatment. Our observations indicate that the mode of administration of antibiotics and the general level of antimicrobial resistance in the community may have an impact on emergence of resistance in intestinal enterobacteria during antibiotic treatment. The WGS analyses detected acquired resistance genes and/or chromosomal mutations that explained the observed phenotypic resistance in all 28 multidrug-resistant E. coli isolates examined.