In what is being called a landmark ruling, a New York State Supreme Court judge determined that the Corcoran Group failed to produce e-mails in a case where the residential giant allegedly sold a flood-prone condominium unit to a couple in Brooklyn.

Judge Charles Ramos, in a 31-page opinion, ruled that the Manhattan-based brokerage was “grossly negligent” for failing to preserve and turn over electronic evidence revealing that Corcoran agents canceled appointments with prospective buyers on rainy days to hide a previously known problem with water leaks.

Corcoran was ordered to pay more than $35,000 in legal fees and court costs accumulated by the plaintiff, while the case continues on to a full trial. Lawyers for the plaintiffs said the ruling creates a new legal precedent for preserving electronic evidence in legal cases.

“This case adopts the basic federal standard of the obligation to preserve electronic evidence into the state court system,” said Jay Itkowitz, attorney for the plaintiffs. “Under federal case law, once you know you’re about to get sued, the obligation to preserve or protect electronic evidence comes into play.”

The case involves a December 2007 lawsuit by Harold Einstein and Jennifer Boyd, a married couple with two young children, who bought a three-bedroom, 1,679-square-foot apartment at 357 4th Street in Park Slope for $1.295 million in June 2007.

Corcoran said in a statement: “We disagree with the discovery ruling and intend to file an appeal at the appropriate time. This case is still in the discovery phase and no decision has yet been made on the merits of the case.”

The plaintiffs said they notified the sponsors about the leaks, and they obtained an engineer’s report note that the building had been constructed using Wonderboard, which is used in construction areas known to have water leaks, according to the lawsuit. There were other alleged defects found in the building, including mold, the accumulation of carbon monoxide in the boiler room and other problems. The engineer estimated that it would take more than $880,000 to fix the construction defects in the building, however the sponsors refused to cure the problems or buy back the apartment, the suit says.

The couple later moved out and into a rental apartment, but they are still being held responsible for the mortgage and common charges.

Margolin & Pierce, the attorneys for Corcoran, were also admonished by the judge after he warned them to “read the riot act” to their clients.” However, Itkowitz said it is unlikely the defendant’s firm would be held responsible for any legal costs.