We report measurements of the temperature dependence of the critical current, I(c), in Josephson junctions consisting of conventional superconducting banks of Nb and a weakly ferromagnetic interlayer of a CuxNi1-x alloy, with x around 0.5. With decreasing temperature I(c) generally increases, but for specific thicknesses of the ferromagnetic interlayer, a maximum is found followed by a strong decrease down to zero, after which I(c) rises again. Such a sharp cusp can be explained only by assuming that the junction changes from a 0-phase state at high temperatures to a pi phase state at low temperatures.