Mutations in the Nod2 gene are among the strongest genetic risk factors in the pathogenesis of ileal Crohn's disease, but the exact contributions of Nod2 to intestinal mucosal homeostasis are not understood. Here we show that Nod2 plays an essential role in controlling commensal bacterial flora in the intestine. Analysis of intestinal bacteria from the terminal ilea of Nod2-deficient mice showed that they harbor an increased load of commensal resident bacteria. Furthermore, Nod2-deficient mice had a diminished ability to prevent intestinal colonization of pathogenic bacteria. In vitro, intestinal crypts isolated from terminal ilea of Nod2-deficient mice were unable to kill bacteria effectively, suggesting an important role of Nod2 signaling in crypt function. Interestingly, the expression of Nod2 is dependent on the presence of commensal bacteria, because mice re-derived into germ-free conditions expressed significantly less Nod2 in their terminal ilea, and complementation of commensal bacteria into germ-free mice induced Nod2 expression. Therefore, Nod2 and intestinal commensal bacterial flora maintain a balance by regulating each other through a feedback mechanism. Dysfunction of Nod2 results in a break-down of this homeostasis.