To interpret the present-day satellite observations of the sequential brightening of coronal loops in solar flares, we have solved the problem of the stability of small longitudinal perturbations of a homogeneous reconnecting current layer (CL). Within the magnetohydrodynamic approximation we show that an efficient suppression of plasma heat conduction by amagnetic field perturbation inside the CL serves as an instability condition. The instability in the linear phase grows in the characteristic radiative plasma cooling time. A periodic structure of cold and hot filaments located across the direction of the electric current can be formed as a result of the instability in the CL. The proposed mechanism of the thermal instability of a reconnecting CL can be useful for explaining the sequential brightening ("ignition") of flare loops in solar flares.