Abstract. W. Wirtinger, in 1902, introduced an integral representation for the Gauss hypergeometric function in terms of theta functions. We give a generalization of this integral representation. More concretely, we study a definite integral of a power product of theta functions which has zeros at N-torsion points (N is a natural number greater than one) on a one-dimensional complex torus. We show that this integral gives a solution of a system of Fuchsian differential equations on the modular curve of level N and determine the spectral types of the system at its regular singularities.