Engineering specialists Mott MacDonald Bentley had been working on a project to replace 500m of damaged sewerage pipe from last September.
The pipe was thought to be more than 100 years old, making it one of the oldest in the region.
A more robust pipe, 40cm in diameter, is now in place between Greengates sewage pumping station on Apperley Road close to the George and Dragon and Apperley Bridge Marina.
Michael Glew, Yorkshire Water project manager, said: “When this ageing pipe burst in the past, there was a risk of pollution to local watercourses, so this scheme was an extremely important piece of work.
“We’d like to thank local residents for their patience throughout this project and apologise for any inconvenience caused.”