Photonic crystals and dielectric metamaterials represent two different classes of artificial media but are often composed of similar structural elements. The question is how to distinguish these two types of periodic structures when their parameters, such as permittivity and lattice constant, vary continuously. Here we discuss transition between photonic crystals and dielectric metamaterials and introduce the concept of a phase diagram, based on the physics of Mie and Bragg resonances. We show that a periodic photonic structure transforms into a metamaterial when the Mie gap opens up below the lowest Bragg bandgap where the homogenization approach can be justified and the effective permeability becomes negative. Our theoretical approach is confirmed by microwave experiments for a metacrystal composed of tubes filled with heated water. This analysis yields deep insight into the properties of periodic structures, and provides a useful tool for designing different classes of electromagnetic materials with variable parameters.