ALBANY -- New York’s highest court on Thursday ruled that although police can lie during interrogation of suspects in homicide cases, detectives can’t lie too much.

As a result, two defendants in two cases won challenges to throw out their statements used as confessions because they were based on lies by police, the Court of Appeals stated.

In one case, police claimed a woman in Westchester County was still alive and that the suspect had to tell police if he had injected his girlfriend with heroin, leading to her overdose. Police said the information was needed to save the life of the woman and so the boyfriend could avoid a murder charge.

The woman was already dead.

In a second case, police told a father they knew he wasn’t responsible for seriously injuring his 4-month-old son, but that he had to explain how he accidentally dropped the boy so doctors could save his life.

The boy was already dead of head injuries that a doctor said was consistent with being in a car crash at 60 mph. At one point police also told the father they might charge his wife in the case.

“Had there been only a few such deceptive assurances, perhaps they might be deemed insufficient to raise a question as to whether the defendant’s confession had been obtained in violation of due process,” the court stated in the case against the father, Adrian Thomas of Troy.

Sign up to receive The 1600 Get our inside look at the White House and goings on in the Donald Trump administration. By clicking Sign up, you agree to our privacy policy.

“Defendant was told 67 times that what had been done to his son was an accident, 14 times that he would not be arrested, and eight times that he would be going home,” the court record stated. “These representations were, moreover, undeniably instrumental in the extraction of a defendant’s most damaging admissions.”

Chief Judge Jonathan Lippman wrote the unanimous decision in the Thomas case.

A similar argument was used in the case of Paul Aveni, the boyfriend of the woman who died of a heroin overdose.

The court found lies by police could “overwhelm defendant’s free will.”