The immune system provides an essential defence against invading pathogens. However, bacteria have evolved numerous strategies to overcome this defence, many of which facilitate systemic dissemination of the pathogen. Nevertheless, the host has evolved many mechanisms to detect and protect against pathogens in the vasculature. Recent studies using new imaging approaches and new mouse models are revealing previously unappreciated functions of this intravascular aspect of the immune system. In this Review, we summarize recent work in this field, highlighting in vivo imaging studies that examine the behaviour of both the immune system and bacteria in the highly dynamic microvasculature.