Gut colonisation by extended-spectrum β-lactamase (ESBL)-producing Escherichia coli is a risk factor for developing overt infection. The gut microbiome can provide colonisation resistance against enteropathogens, but it remains unclear whether it confers resistance against ESBL-producing E coli. We aimed to identify a potential role of the microbiome in controlling colonisation by this antibiotic-resistant bacterium. For this matched case-control study, we used faeces from 2751 individuals in a Dutch cross-sectional population study (PIENTER-3) to culture ESBL-producing bacteria. Of these, we selected 49 samples that were positive for an ESBL-producing E coli (ESBL-positive) and negative for several variables known to affect microbiome composition. These samples were matched 1:1 to ESBL-negative samples on the basis of individuals' age, sex, having been abroad or not in the past 6 months, and ethnicity. Shotgun metagenomic sequencing was done and taxonomic species composition and functional annotations (ie, microbial metabolism and carbohydrate-active enzymes) were determined. Targeted quantitative metabolic profiling (proton nuclear magnetic resonance spectroscopy) was done to investigate metabolomic profiles and combinations of univariate (t test and Wilcoxon test), multivariate (principal coordinates analysis, permutational multivariate analysis of variance, and partial least-squares discriminant analysis) and machine-learning approaches (least absolute shrinkage and selection operator and random forests) were used to analyse all the molecular data. No differences in diversity parameters or in relative abundance were observed between ESBL-positive and ESBL-negative groups based on bacterial species-level composition. Machine-learning approaches using microbiota composition did not accurately predict ESBL status (area under the receiver operating characteristic curve [AUROC]=0·41) when using either microbiota composition or any of the functional profiles. The metabolome also did not differ between ESBL groups, as assessed by various methods including random forest (AUROC=0·61). By combining multiomics and machine-learning approaches, we conclude that asymptomatic gut carriage of ESBL-producing E coli is not associated with an altered microbiome composition or function. This finding might suggest that microbiome-mediated colonisation resistance against ESBL-producing E coli is not as relevant as it is against other enteropathogens and antibiotic-resistant bacteria. None.