Last week, the city’s Investigation Department began a coordinated effort with Con Ed, the Buildings Department and the Manhattan district attorney’s office to locate illegal natural-gas hookups that were potentially hazardous, a law enforcement official said on Monday. That effort was a reaction to the blast in the East Village, which law enforcement officials have said they believe was caused by a gas leak that resulted from attempts to siphon gas intended for a ground-floor restaurant to fuel stoves and water-heaters in apartments above it.

But when Con Edison workers found evidence of the siphoning in the building that stood at 121 Second Avenue in Manhattan, the gas had been drawn off after being measured by the utility’s meter, so there was no allegation of “theft of service” from the utility. At the Carnegie Deli, however, Con Edison said about half of the gas that the utility was delivering to the building was being diverted before the meter and, therefore, not showing up on the deli’s bills.

After determining that the diversion had lasted six years, Con Edison demanded that the deli pay $40,050, the estimated cost to deliver all that unmeasured gas, said Bob McGee, a spokesman for the utility. He said the deli’s owner “cut us a check on the spot.”

Mr. McGee added that the deli buys the gas that Con Edison delivers from a different company and would have to settle up with that company separately.