Rare-earth-based permanent-magnet materials rich in iron have relatively low ferromagnetic ordering temperatures. This is believed to be due to the presence of antiferromagnetic exchange interactions, besides the ferromagnetic interactions responsible for the magnetic order. The magnetic properties of Ce2Fe17 are anomalous. Instead of ferromagnetic, it is antiferromagnetic, and instead of one ordering temperature, it shows two, at the Neel temperature TN ~ 208 K and at TT ~ 124 K. Ce2Fe17, doped by 0.5% Ta, also shows two ordering temperatures, one to an antiferromagnetic phase, at TN ~ 214 K, and one to a ferromagnetic phase, at T0 ~ 75 K. In order to clarify this behavior, single-crystalline samples were prepared by solution growth, and characterized by electron microscopy, single crystal x-ray diffraction, temperature-dependent specific heat, and magnetic field and temperature-dependent electrical resistivity and magnetization. From these measurements, magnetic H-T phase diagrams were determined for both Ta-doped Ce2Fe17 and undoped Ce2Fe17. These phase diagrams can be very well described in terms of a theory that gives magnetic phase diagrams of systems with competing antiferro- and ferromagnetism.