The city and several New Yorkers are suing Con Edison and a construction company over the 2014 East Harlem gas blast that left eight dead, according to court papers. ​​

While the de Blasio administration wants both the utility and the Hallen Construction Co. to repay the city for nearly $400,000 it spent to repair a water main damaged in the explosion, more than 100 East Harlem residents are seeking undisclosed payouts for negligence, injury and loss of property.

In its yet-to-be-filed suit, the city claims the companies’​ shoddy workmanship was to blame for the March ​2014 ​explosion, which felled two buildings at Park Avenue and East 116th Street, left 50 injured and damaged the water main under Park.

“Con Edison, through its employees, agents, contractors, or representatives, including Hallen, failed to properly fuse the subject gas service line to the plastic section of the subject gas main creating a defective fusion joint,” the city’s Manhattan court filing reads. ​ ​

The “gas explosion was directly and proximately caused by a gas leak from the defective fusion joint,” the suit explains.

The explosion damaged city property, the papers allege, and repairing the damaged water main cost New York $385,000.

“The city has brought this action to recoup the cost of repairing city property,” a Law Department spokesman said.

“We’ll respond to the matter in court,” said a spokesman for Con Edison. Hallen did not immediately return a message seeking comment.

The city’s suit follows 10 class-action suits filed Friday against the companies — with some also naming two others, New York Heating Corp. and Plumbing Works — by residents, citing various damages.

One complaint, filed on behalf of victim Mayumi Nakamura, details how she was sitting in her living room when the explosion occurred, causing her windows to shatter and the walls to cave in, crushing her to death.

Representatives from neither New York Heating nor Plumbing Works returned messages.

Con Edison sued the city in June 2015, claiming it knew about faulty infrastructure on the site and failed to address it quickly enough.

That case is still pending.

​​Additional reporting by Chad Rachman