The zebrafish genome contains ten genes that encode class II cytokine-like peptides, of which the two that are related most closely to mammalian interferon gamma (IFN-gamma) were named IFN-gamma1 and IFN-gamma2. Although the zebrafish has become a popular model system to study immune mechanisms, and although interferons are central regulators of immunity, which zebrafish cytokines correspond functionally to mammalian IFN-gamma has not been established. We used zebrafish embryos to assay the functions of IFN-gamma1 and IFN-gamma2, and have identified a subset of zebrafish homologs of the mammalian IFN-responsive genes as IFN-gamma targets in the zebrafish embryo: these genes are upregulated in response to raised levels of either IFN-gamma1 or IFN-gamma2. Infection studies using two different pathogens show that IFN-gamma signalling is required for resistance against bacterial infections in the young embryo and that the levels of IFN-gamma need to be regulated tightly: raising IFN-gamma levels sensitizes fish embryos against bacterial infection. Embryos injected with high doses of Escherichia coli are able to clear the bacteria within a day, and the gamma-interferons are necessary for this defence reaction. The protective response to Yersinia ruckeri, a natural fish pathogen that is lethal at low doses, also requires IFN-gamma. As in the induction of target genes, the two interferons act at least partly redundantly. Together with the previously demonstrated type III interferon response, these results show that the counterparts of the mammalian viral and bacterial interferon-dependent defence functions are in place in zebrafish embryos, and suggest that zebrafish IFN-gamma1 and IFN-gamma2 are functionally equivalent to mammalian IFN-gamma.