Primary Klebsiella pneumoniae liver abscess complicated with metastatic meningitis or endophthalmitis is a globally emerging infectious disease. Its pathogenic mechanism remains unclear. The bacterial virulence factors were explored by comparing clinical isolates. Differences in mucoviscosity were observed between strains that caused primary liver abscess (invasive) and those that did not (noninvasive). Hypermucoviscosity correlated with a high serum resistance and was more prevalent in invasive strains (52/53 vs. 9/52; P < 0.0001). Transposon mutagenesis identified candidate virulence genes. A novel 1.2-kb locus, magA, which encoded a 43-kD outer membrane protein, was significantly more prevalent in invasive strains (52/53 vs. 14/52; P < 0.0001). The wild-type strain produced a mucoviscous exopolysaccharide web, actively proliferated in nonimmune human serum, resisted phagocytosis, and caused liver microabscess and meningitis in mice. However, magA
− mutants lost the exopolysaccharide web and became extremely serum sensitive, phagocytosis susceptible, and avirulent to mice. Virulence was restored by complementation using a magA-containing plasmid. We conclude that magA fits molecular Koch's postulates as a virulence gene. Thus, this locus can be used as a marker for the rapid diagnosis and for tracing the source of this emerging infectious disease.