Some macrophages inhibit microbial infections by producing indoleamine 2,3 dioxygenase (IDO), which catabolizes tryptophan. Here, Andrew Mellor and David Munn discuss evidence that cells that synthesize IDO protect the mammalian fetus from maternal T-cell attack and argue that this mechanism might have wider implications for the control of T-cell responses.