Six-year-old Zymere Perkins was beaten, starved and tortured by his mother’s boyfriend for more than a year as she stood by silently — until the little boy finally gave up, prosecutors argued Monday as the man’s murder trial began.

“He died almost one cell a time,” said Assistant DA Kerry O’Connell in her heartbreaking opening statements for the Manhattan Supreme Court trial of Rysheim Smith.

The prosecutor detailed the little boy’s final agonizing hours on Sept. 26, 2016, in a squalid apartment infested with roaches and covered in mold following what she described as prolonged and merciless abuse by Smith.

Smith, 45, grew enraged after the malnourished child defecated in the living room, O’Connell charged.

“He picked up Zymere, held him by the arm and began to beat him with a stick like he was a little piñata,” she told the jury.

“Tellingly, he did not call out to his mother…because he knew his mother was not going to protect him.”

Smith continued the vicious assault with a broom handle then dumped the child under a cold shower — while his mother, Geraldine Perkins, looked on passively, the prosecutor alleged.

Then, after Zymere lost consciousness and collapsed in the bathtub, Smith bludgeoned him with a shower curtain rod, cutting the boy’s head, she said.

Smith plucked up the tiny child and hung him in his wet clothes on a hook affixed to the bathroom door. O’Connell said this was likely “where he took his last breath.”

Eventually, Smith lifted Zymere off the hook and threw him into a bedroom wall, where he crumpled to the floor, she alleged.

Smith left the apartment to get food. When Perkins checked on Zymere, he was already dead.

Police showed up at the apartment later that day to interview Smith, who had a beer in one hand, and said he was having a rough day, the prosecutor said.

Jurors were shown shocking photos of the little boy’s body — his chest and belly covered in scratches, scars, and bruises. An autopsy would later reveal that he had more rib fractures than ribs, the prosecutor said.

Smith, who had met Perkins 16 months earlier, called his tactics discipline and said the abuse “would make a man out of a little boy,” O’Connell said.

He insisted the child needed toughness and encouraged Perkins to adopt his methods. O’Donnell said Smith completely dominated Perkins, who had put her relationship with him before her own son.

The details of Zymere’s death exposed stunning failures at the Administration for Children’s Services and shocked the city.

Prior to the murder, ACS had launched five separate investigations into allegations of abuse against Zymere but failed to intervene or follow up.

ACS boss Gladys Carrion eventually resigned over the shocking failure and Gov. Andrew Cuomo appointed an independent monitor to oversee the beleaguered agency.

The case brought to light 10 other child deaths that occurred after the agency had received abuse complaints and failed to properly investigate.

Perkins eventually cooperated with authorities, pleading guilty to manslaughter and agreeing to testify against Smith. She was promised two to six years in prison.

In her opening statement, defense lawyer Heather Smith argued that Zymere “suffered more than anyone should ever have to suffer in their life” but that it was at the hands of his own mother, not Smith.

The attorney called Perkins, “a known liar with every incentive to lie to save her own life.”

Smith faces up to life in prison if convicted of second-degree murder, manslaughter and other charges.