The present invention relates to the field of prophylaxis and therapy of cancer. In particular there is provided a protein Indoleamine 2,3-dioxygenase (IDO) or peptide fragments here of that are capable of eliciting anti-cancer immune responses. Specifically, the invention relates to the use of IDO or peptides derived here from or IDO specific T-cells for treatment of cancer. The invention thus relates to an anti-cancer vaccine which optionally may be used in combination with other immunotherapies and to IDO specific T-cells adoptively transferred or induced in vivo by vaccination as a treatment of cancer. It is an aspect of the invention that the medicaments herein provided may be used in combination with cancer chemotherapy treatment. A further aspect relates to the prophylaxis and therapy of infections by the same means as described above. The use of IDO and immunogenic peptide fragments hereof in cancer and infection treatment, diagnosis and prognosis is also provided.