One of the main aims of wildlife disease ecology is to identify how disease dynamics vary in space and time and as a function of population density. However, monitoring spatiotemporal and density‐dependent disease dynamics in the wild is challenging because the observation process is error‐prone, which means that individuals, their disease status, and their spatial locations are unobservable, or only imperfectly observed. In this paper, we develop a novel spatially‐explicit capture‐recapture (SCR) model motivated by an SCR data set on European badgers (Meles meles), naturally infected with bovine tuberculosis (Mycobacterium bovis, TB). Our model accounts for the observation process of individuals as a function of their latent activity centers, and for their imperfectly observed disease status and its effect on demographic rates and behavior. This framework has the advantage of simultaneously modeling population demographics and disease dynamics within a spatial context. It can therefore generate estimates of critical parameters such as population size; local and global density by disease status and hence spatially‐explicit disease prevalence; disease transmission probabilities as functions of local or global population density; and demographic rates as functions of disease status. Our findings suggest that infected badgers have lower survival probability but larger home range areas than uninfected badgers, and that the data do not provide strong evidence that density has a non‐zero effect on disease transmission. We also present a simulation study, considering different scenarios of disease transmission within the population, and our findings highlight the importance of accounting for spatial variation in disease transmission and individual disease status when these affect demographic rates. Collectively these results show our new model enables a better understanding of how wildlife disease dynamics are linked to population demographics within a spatiotemporal context.