We prove the “End Curve Theorem,” which states that a normal surface singularity (X, o) with rational homology sphere link Σ is a splice quotient singularity if and only if it has an end curve function for each leaf of a good resolution tree. An “end curve function” is an analytic function (X, o) → (ℂ, 0) whose zero set intersects Σ in the knot given by a meridian curve of the exceptional curve corresponding to the given leaf. A “splice quotient singularity” (X, o) is described by giving an explicit set of equations describing its universal abelian cover as a complete intersection in ℂ\_t\_ , where t is the number of leaves in the resolution graph for (X, o), together with an explicit description of the covering transformation group. Among the immediate consequences of the End Curve Theorem are the previously known results: (X, o) is a splice quotient if it is weighted homogeneous (Neumann 1981), or rational or minimally elliptic (Okuma 2005).