They thought she was making it all up. It cost a little boy his life.

From cops and social workers to lawyers and judges, Long Island mom Justyna Zubko-Valva claims no one took her warnings about her NYPD cop husband, Michael Valva, seriously.

Alleging sex abuse, starvation, brainwashing, beatings and possible child porn, the mom had insisted their three sons were suffering at Valva’s hands.

But instead of getting help, Zubko-Valva became lost in a legal labyrinth where she was the one on trial, painted as a scorned woman with a “vendetta,” court papers show.

One Suffolk County Family Court prosecutor slammed her as “mentally ill,” court papers show. Nassau County cops allegedly dismissed her as a mom “going for custody.” The NYPD apparently ignored her allegation that her ex was having sex in patrol cars on duty.

A Nassau judge gave custody of the three boys to Valva, who police now say killed one of them — the couple’s 8-year-old autistic son, Thomas — by leaving him overnight in a freezing garage at his Center Moriches home on Jan. 17.

Valva and his fiancée, Angela Pollina, were charged in Thomas’ death. Only then was Zubko-Valva given custody of her surviving sons, Anthony, 10, and Andrew, 6.

“I don’t know if it’s because he’s a cop. I don’t know if it’s because he had powerful friends in powerful places. It made zero sense to me,” autism expert Kimberly Berens, who worked with Anthony and Thomas, said of the custody battle.

Zubko-Valva’s neighbor Kathleen Izzo said: “The bottom line is she was not a lunatic. She was exactly right.”

By 2016, the couple had split, and Valva, 40, a transit officer, was forging a “Brady Bunch”-esque household with Pollina, 42, a mother of three girls.

The boys said Valva sexually abused them during weekend visits, Zubko-Valva claims.

There was no evidence of sexual abuse, authorities contend.

By September 2017, matrimonial Judge Hope Schwartz Zimmerman gave custody of the boys to their dad.

Berens said: “It was key to her losing custody, the lies Mike said about her. There were a number of professionals that a judge could have reached out to, to judge our experience with Justyna as a mother. Not one person contacted me, as a professional before Justyna lost custody of her kids.”

Child protection officials weren’t interested either, Berens charged.

“I called. I either got apathy, incompetence or hatefulness,” she said.

Valva and Pollina accused Zubko-Valva of feeding the boys brown medicine that made them vomit and of excessive corporal punishment, court papers show.

By October 2017, Zubko-Valva was on trial for neglect while her boys were living with their dad. Unable to afford a lawyer, the mom floundered in court.

“They are in extreme danger of their lives at this point,” Zubko-Valva told Judge Bernard Cheng in October 2018 of the boys.

The boys backed up the dad’s charges, authorities said, but the kids were little more than “parrots,” insisted Berens, who twice testified on Zubko-Valva’s behalf.

“At the time, Anthony had no understanding of what was a truth versus a lie,” she said.

In his closing argument, a county prosecutor insisted Zubko-Valva was “mentally ill and that she believes there is a conspiracy between the father and Child Protective Service,” according to court papers.

Cheng dismissed the neglect charges in April, telling Zubko-Valva to return to Nassau court to regain custody, but her petition wasn’t heard for months.

“It was like a circle without exit,” the mom lamented.