Abstract. We give an elementary and rigorous proof of the Thomae type formula for the singular curvesTo derive the Thomae formula we use the traditional variational method which goes back to Riemann, Thomae and Fuchs. An important step of the proof is the use of the Szegö kernel computed explicitly in algebraic form for non-singular 1/N -periods. The proof inherits principal points of Nakayashiki's proof [31], obtained for non-singular Z N curves.