A theory of the origin of lightning in which it is proposed that lightning is initiated by a cosmic ray hitting a molecule in a cloud with an electric field. This releases an electron into the cloud, where it is accelerated in the field. The fast-moving electron then ionizes other atoms and molecules and there is a chain reaction producing many rapidly moving electrons. This theory explains how lightning can occur in spite of the electric field of the cloud being insufficient to cause breakdown ionization in air.