Resonant metamaterials usually exhibit substantial dispersion, which is considered a shortcoming for many applications. Here we take advantage of the ability to tailor the dispersive response of a metamaterial, introducing a new method of group-velocity dispersion compensation in telecommunication systems. The method consists of stacking a number of highly dispersive sheet metamaterials and is capable of compensating the dispersion of optical fibers with either negative or positive group-velocity dispersion coefficients. We demonstrate that the phase-engineered metamaterial can provide strong group-velocity dispersion management without being adversely affected by large transmission loss, while at the same time offering high customizability and a small footprint.