The body is home to a diverse microbiota, mainly in the gut. Resistant bacteria are selected by antibiotic treatments, and once resistance becomes widespread in a population of hosts, antibiotics become useless. Here, we develop a multiscale model of the interaction between antibiotic use and resistance spread in a host population, focusing on an important aspect of within‐host immunity. Antibodies secreted in the gut enchain bacteria upon division, yielding clonal clusters of bacteria. We demonstrate that immunity‐driven bacteria clustering can hinder the spread of a novel resistant bacterial strain in a host population. We quantify this effect both in the case where resistance preexists and in the case where acquiring a new resistance mutation is necessary for the bacteria to spread. We further show that the reduction of spread by clustering can be countered when immune hosts are silent carriers, and are less likely to get treated, and/or have more contacts. We demonstrate the robustness of our findings to including stochastic within‐host bacterial growth, a fitness cost of resistance, and its compensation. Our results highlight the importance of interactions between immunity and the spread of antibiotic resistance, and argue in the favor of vaccine‐based strategies to combat antibiotic resistance.