Inherited from Vulgar Latin *merēscere, from Latin merēre.
Practice speaking and memorizing "merecer" and many other words and sentences in Spanish.