Described is a liquid crystal composition which satisfies at least one of such characteristics as high upper limit temperature of the nematic phase, low lower limit temperature of the nematic phase, low viscosity, adequate optical anisotropy, large negative dielectric anisotropy, high resistivity, high stability to ultraviolet light and high stability to heat, or which has an adequate balance between at least two of the above-mentioned characteristics. Also described is an AM element having a short response time, high voltage holding ratio, high contrast ratio, long life and the like. The liquid crystal composition contains a specific compound having a large negative dielectric anisotropy and a low lower limit temperature as a first component, a specific compound having a low viscosity or a high upper limit temperature as a second component, and a specific compound having a polymerizable group as a third component. The AM element contains the composition.