We report subwavelength localization of electromagnetic fields within cavities based on metamaterials. Cavity resonances are observed in the transmission spectrum of a split-ring resonator and composite metamaterials cavity structures. These cavity resonances are shown to exhibit high-quality factors. Since the unit cells of metamaterials are much smaller than the operation wavelength, subwavelength localization is possible within these metamaterial cavity structures. In the present Letter, we show that the electromagnetic field is localized into a region of lambda/8, where lambda is the cavity resonance wavelength. (c) 2008 Optical Society of America OCIS codes: 350.4010, 160.3918.