A liquid crystal composition including at least one compound selected from the group of compounds represented by formula as a first component and at least one compound selected from the group of compounds represented by formula as a second component: in formula, P 1 and P 2 are independently a group selected from groups represented by formula (P-1), formula (P-2) and formula (P-3): in formula (P-1), M 1 and M 2 are independently hydrogen, fluorine, methyl or trifluoromethyl, and in formula (P-3), n 1 is 1, 2, 3 or 4; the ring A and the ring B are independently 1,4-cyclohexylene, 1,4-cyclohexenylene, 1,4-phenylene, naphthalene-1,4-diyl, naphthalene-1,5-diyl, naphthalene-2,6-diyl, tetrahydropyran-2,5-diyl, 1,3-dioxane-2,5-diyl, pyrimidine-2,5-diyl or pyridine-2,5-diyl, and in these groups at least one hydrogen may be replaced by halogen, alkyl having 1 to 12 carbons or alkyl having 1 to 12 carbons in which at least one hydrogen has been replaced by halogen; Z 1 and Z 2 are independently alkylene having 1 to 10 carbons, and in the alkylene at least one -CH 2 - may be replaced by -O- or -OCOO- and at least one -CH 2 -CH 2 - may be replaced by -CH=CH- or -C≡C-; and at least one of Z 1 and Z 2 has -O- when both P 1 and P 2 are a group represented by formula (P-2); L 1 is independently a single bond, -COO- or -CH=CH-; q is 0, 1, 2 or 3; and at least one of Z 1 and Z 2 has -CH=CH- or -C≡C- when q is 1 or 2 and all of the ring A and the ring B are 1,4-phenylene; in formula, R 1 and R 2 are independently alkyl having 1 to 12 carbons, alkoxy having 1 to 12 carbons or alkenyl having 2 to 12 carbons; the ring C and the ring E are independently 1,4-cyclohexylene, tetrahydropyran-2,5-diyl, 1,4-phenylene, 2-fluoro-1,4-phenylene or 3-fluoro-1,4-phenylene; the ring D is 2,3-difluoro-1,4-phenylene, 2-chloro-3-fluoro-1,4-phenylene, 2,3-difluoro-5-methyl-1,4-phenylene, 3,4,5-trifluoronaphthalene-2,6-diyl or 7,8-difluorochroman-2,6-diyl; Z 3 and Z 4 are independently a single bond, ethylene, methyleneoxy or carbonyloxy; and r is 1, 2 or 3, s is 0 or 1, and the sum of r and s is 3 or less. P 1 and P 2 are independently a group selected from groups represented by formula (P-1), formula (P-2) and formula (P-3): in formula (P-1), M 1 and M 2 are independently hydrogen, fluorine, methyl or trifluoromethyl, and in formula (P-3), n 1 is 1, 2, 3 or 4; the ring A and the ring B are independently 1,4-cyclohexylene, 1,4-cyclohexenylene, 1,4-phenylene, naphthalene-1,4-diyl, naphthalene-1,5-diyl, naphthalene-2,6-diyl, tetrahydropyran-2,5-diyl, 1,3-dioxane-2,5-diyl, pyrimidine-2,5-diyl or pyridine-2,5-diyl, and in these groups at least one hydrogen may be replaced by halogen, alkyl having 1 to 12 carbons or alkyl having 1 to 12 carbons in which at least one hydrogen has been replaced by halogen; Z 1 and Z 2 are independently alkylene having 1 to 10 carbons, and in the alkylene at least one -CH 2 - may be replaced by -O- or -OCOO- and at least one -CH 2 -CH 2 - may be replaced by -CH=CH- or -C≡C-; and at least one of Z 1 and Z 2 has -O- when both P 1 and P 2 are a group represented by formula (P-2); L 1 is independently a single bond, -COO- or -CH=CH-; q is 0, 1, 2 or 3; and at least one of Z 1 and Z 2 has -CH=CH- or -C≡C- when q is 1 or 2 and all of the ring A and the ring B are 1,4-phenylene; in formula, R 1 and R 2 are independently alkyl having 1 to 12 carbons, alkoxy having 1 to 12 carbons or alkenyl having 2 to 12 carbons; the ring C and the ring E are independently 1,4-cyclohexylene, tetrahydropyran-2,5-diyl, 1,4-phenylene, 2-fluoro-1,4-phenylene or 3-fluoro-1,4-phenylene; the ring D is 2,3-difluoro-1,4-phenylene, 2-chloro-3-fluoro-1,4-phenylene, 2,3-difluoro-5-methyl-1,4-phenylene, 3,4,5-trifluoronaphthalene-2,6-diyl or 7,8-difluorochroman-2,6-diyl; Z 3 and Z 4 are independently a single bond, ethylene, methyleneoxy or carbonyloxy; and r is 1, 2 or 3, s is 0 or 1, and the sum of r and s is 3 or less.