In the three years before July’s fatal Midtown steam explosion, Con Ed had complained to the city four times about leaky underground water and drainage pipes partly blamed for the disaster, The Post has learned.

Despite the complaints – made in September and November 2003, April 2004 and December 2006 – the leaks near the intersection of Lexington Avenue and 41st Street apparently continued, say consultants hired by Con Ed to probe the disaster.

The July 18 blast was triggered by cool water from heavy rainfall and leaky pipes nearby, the consultants say. That cool, outside water chilled the high-pressure vapor inside the steam pipe, creating pools of water that slammed around and made it burst.

After the blast, investigators found leaks in 24 of 25 joints in one city water main pulled from the scene.

“Any minor leakage from these water lines would increase the external water level that could be in contact with the steam main,” a Con Ed consultant said.

But city officials insist the revelations don’t let Con Ed off the hook for the disaster, in which one woman died of a heart attack while fleeing and two people were severely burned.

“If its system had been in proper condition, the explosion would not have occurred,” said Christopher Murdoch, an attorney in the city Department of Law.

He said the suggestion by Con Ed consultants that some of the water came from city pipes “is completely unsupported by any reliable evidence or analysis.”

The city and Con Ed face several possible lawsuits over the disaster.

Con Ed concedes that epoxy used to plug pipe leaks clogged steam traps, which are pressure-release valves that might have prevented the explosion. All the steam traps in the system have been replaced, Con Ed says.

City officials confirmed three of the four Con Ed complaints about leaky pipes and said that only once did they result in a repair job – to a catch basin in the fall of 2003.

The city said it responded in April 2004 to a Con Ed complaint of a collapsed catch basin spilling water on the steam main. But city workers could not find the problem.

And the city confirmed getting a Con Ed complaint in December 2006 about leaking pipes. Again, workers could not find a leak.

People in neighboring buildings also complained about a sewer smell in October and December 2006, less than a year before the disaster, the city said.

But the city says it found no sewage leaking in the area – though workers did find a dirty catch basin, which they cleaned.

Public Service Commission officials have complained that Con Ed knew water was a problem around the steam pipe and failed to regularly inspect it after heavy rain.