Abstract. Let M ⊂ C 2 be a connected real-analytic hypersurface containing a connected complex hypersurface E ⊂ C 2 , and let f : M → C 2 be a smooth CR mapping sending M into another real-analytic hypersurface M ′ ⊂ C 2 . In this paper, we prove that if f does not collapse E to a point and does not collapse M into the image of E, and if the Levi form of M vanishes to first order along E, then f is real-analytic in a neighborhood of E. In general, the corresponding statement is false if the Levi form of M vanishes to second order or higher, in view of an example due to the author. We also show analogous results in higher dimensions provided that the target M ′ satisfies a certain nondegeneracy condition.The main ingredient in the proof, which seems to be of independent interest, is the prolongation of the system defining a CR mapping sending M into M ′ to a Pfaffian system on M with singularities along E. The nature of the singularity is described by the order of vanishing of the Levi form along E.