Justice Maxwell Wiley declared a mistrial in the case on Friday, the 18th day of deliberations, after the jurors sent him a note for the third time saying they were unable to reach a verdict. In a rare post-trial news conference in the courthouse, several explained the course of their deliberations. None hinted at any negative feelings toward the one juror who, after several others changed positions, could not be persuaded to convict Mr. Hernandez.

But as they left, a juror who did vote to convict, Alia Dahhan, had a final word for the defendant, who had already been escorted back toward his jail cell.

“Pedro Hernandez,” she yelled to television cameras. “You know what you did!”

On the first day of deliberations, they took a vote. Eight were ready to convict Mr. Hernandez. But a couple of them later became unsure. Defense lawyers had raised substantial questions about Mr. Hernandez’s mental health and intellectual abilities, saying he was incapable of giving a reliable confession. The defense also offered a competing theory that the killer was Jose A. Ramos, a convicted child molester who was the prime suspect for years.

Their discussions were rigorous. Some jurors had kept several pads full of notes. A group comprised almost entirely of white-collar professionals, they made seven spreadsheets with details from the case, including Mr. Hernandez’s medical history and timelines from the case. There were times when the discussions grew heated, though never meanspirited.

One juror, Edwin R. Thompson, said there was “camaraderie,” along with “argumentation,” some raised voices, and “tears on occasion,” most often stemming from personal disagreements over who in the jury room had said what.