We develop theory and methodology for nonparametric registration of functional data that have been subjected to random deformation of their time scale. The separation of this phase ("horizontal") variation from the amplitude ("vertical") variation is crucial for properly conducting further analyses, which otherwise can be severely distorted. We determine precise nonparametric conditions under which the two forms of variation are identifiable, and this delicately depends on the underlying rank. Using several counterexamples, we show that our conditions are sharp if one wishes a truly nonparametric setup. We show that contrary to popular belief, the problem can be severely unidentifiable even under structural assumptions (such as assuming the synchronised data are cubic splines) or roughness penalties (smoothness of the registration maps). We then propose a nonparametric registration method based on a "local variation measure", the main element in elucidating identifiability. A key advantage of the method is that it is free of tuning or penalisation parameters regulating the amount of alignment, thus circumventing the problem of over/under-registration often encountered in practice. We carry out detailed theoretical investigation of the asymptotic properties of the resulting functional estimators, establishing consistency and rates of convergence, when identifiability holds. When deviating from identifiability, we give a complementary asymptotic analysis quantifying the unavoidable bias in terms of the spectral gap of the amplitude variation, establishing stability to mild departures from identifiability. Our methods and theory cover both continuous and discrete observations with and without measurement error. Simulations demonstrate the good finite sample performance of our method compared to other methods in the literature, and this is further illustrated by means of a data analysis.