We prove the existence of the path-integral measure of two-dimensional YangMills theory, as a probabilistic Radon measure on the “generalized orbit space” of gauge connections modulo gauge transformations, suitably completed following the approach of Ashtekar and Lewandowski. It has been known for some time that two-dimensional Yang-Mills theory is completely solvable, in the sense that expectation values of a natural class of observables (the Wilson loop functions) with respect to the formal path integral “measure” can be explicitly calculated, i.e. reduced to finite-dimensional integrals. This holds both for the theory on the two-plane, and on topologically nontrivial surfaces. However, a very natural question that seems not to have been addressed in generality is whether the formal path integral measure actually corresponds to some well-defined measure, in the sense of measure theory, and if so, what is the carrier space of such a measure. Actually, for the case of the two-plane a positive answer was provided in [4]; however, the case of compact Riemann surfaces presents significant new features that must be dealt with in a different way. As to the second point, it is generally known that it is not correct to assume that the carrier space of the path integral measure for a quantum field theory is the same as the space of classical smooth field configurations; instead, one must take some completion of this space, incorporating distribution-valued fields in some sense. A concrete realization of this idea for theories of connections (i.e. gauge theories and gravity) was proposed by 1991 Mathematics Subject Classification: 81T13, 28C20. The paper is in final form and no version of it will be published elsewhere.