The polarizations of promptly produced χc1 and χc2 mesons are studied using data collected by the CMS experiment at the LHC, in proton-proton collisions at s=8 TeV. The χc states are reconstructed via their radiative decays χc→J/ψγ, with the photons being measured through conversions to e+e-, which allows the two states to be well resolved. The polarizations are measured in the helicity frame, through the analysis of the χc2 to χc1 yield ratio as a function of the polar or azimuthal angle of the positive muon emitted in the J/ψ→μ+μ- decay, in three bins of J/ψ transverse momentum. While no differences are seen between the two states in terms of azimuthal decay angle distributions, they are observed to have significantly different polar anisotropies. The measurement favors a scenario where at least one of the two states is strongly polarized along the helicity quantization axis, in agreement with nonrelativistic quantum chromodynamics predictions. This is the first measurement of significantly polarized quarkonia produced at high transverse momentum.