We followed the formation of metal ion substituted aluminophosphate, a redox molecular sieve, using a newly developed in situ simultaneous X-ray diffraction and X-ray absorption spectroscopic technique. The study showed that a cobalt-phosphorous network forms prior to the crystallisation.