N-Nitrosodimethylamine (NDMA), a potential human carcinogen, is known to be a disinfection byproduct of chloramination and ozonation. NDMA is formed during ozonation at water purification plants in the Yodo River basin, a major drinking water source in western Japan. An NDMA precursor, 1,1,5,5-tetramethylcarbohydrazide (TMCH) was identified in sewage containing industrial effluents via ultrahigh performance liquid chromatography-tandem mass spectrometry, and ultrahigh performance liquid chromatography-time-of-flight mass spectrometry, as well as nuclear magnetic resonance spectroscopy. The mean of the NDMA molar formation yield of TMCH upon ozonation in four water matrices was 140%. TMCH removal was low during biological treatment processes at a sewage treatment plant. The mean TMCH contribution to total NDMA precursors upon ozonation of the primary, secondary, and final effluents of the sewage treatment plant in January and February of 2014 was 43-72%, 51-72%, and 42-60%, respectively, while the contributions of 4,4'-hexamethylenebis(1,1-dimethylsemicarbazide) and 1,1,1',1'-tetramethyl-4,4'-(methylene-di-p-phenylene)disemicarbazide, two other known NDMA precursors, were limited to 0.6% and 6.9%, respectively. Thus, TMCH was identified as the primary precursor yielding NDMA upon ozonation in the Yodo River basin.