Eradication of pathogens from the bloodstream is critical to prevent disseminated infections and sepsis. Kupffer cells in the liver form an intravascular firewall that captures and clears pathogens from the blood. Here, we show that the catching and killing of circulating pathogens by Kupffer cells in vivo are promoted by the gut microbiota through commensal-derived D-lactate that reaches the liver via the portal vein. The integrity of this Kupffer cell-mediated intravascular firewall requires continuous crosstalk with gut commensals, as microbiota depletion with antibiotics leads to a failure of pathogen clearance and overwhelming disseminated infection. Furthermore, administration of purified D-lactate to germ-free mice, or gnotobiotic colonization with D-lactate-producing commensals, restores Kupffer cell-mediated pathogen clearance by the liver firewall. Thus, the gut microbiota programs an intravascular immune firewall that protects against the spread of bacterial infections via the bloodstream.Copyright © 2020 Elsevier Inc. All rights reserved.