More than 100 residents went without gas for a day after their neighbour's boiler was connected to the wrong pipe.
Water had entered the gas system from a property in Maritime Way, Preston, on Friday. Nearby homes were then cut off while engineers fixed the problem.
After draining the offending pipe, National Grid staff had to visit each of the 57 homes individually and check they had been reconnected safely.
National Grid warned people to use only certified firms when fitting boilers.
A spokeswoman added: "This kind of thing is not a common occurrence. We managed to trace the problem back to a resident's home nearby.
"Engineers used a purge and relight system at every affected property to ensure the supply had returned and it was safe to use."