We have observed, for the first time, a temperature dependent 0-pi junction crossover in a 45 symmetric [001] tilt grain boundary junction. Experimental data, obtained by a double phase-sensitive test based on a low inductance dc SQUID, show an anomalous nonmonotonic temperature dependence of the Josephson current, clear evidence of a critical current sign change at a temperature T*. At the same temperature, the SQUID undergoes a transition from a 0-SQUID to a pi-SQUID. Results are in good agreement with theoretical models taking into account mid-gap states in low transparency junctions.