Long Island prosecutors say a New York police officer called his eight-year-old son a 'f*****g piece of s**t' and bragged that he had 'been through more stressful things' when he learned the boy died of hypothermia in his garage.

Gasps were heard in Suffolk County Court in Riverhead on Thursday as prosecutors read text messages that Michael Valva sent to his fiancee just two days before his autistic son, Thomas, died at his home in Center Moriches on January 17.

Thomas, who was allegedly being starved, beaten and locked outside overnight by his father, was laid to rest last Thursday in the Long Island neighborhood of Melville.

Both Michael Valva and his fiancee, Angela Pollina, have since been charged with second-degree murder but deny any wrongdoing.

It is alleged that the boy was forced to sleep in an unheated garage at the couple's home as temperatures dropped to under 20 degrees.

'I have zero clothing for him,' Valva texted to Pollina.

Michael Valva (left) referred to his eight-year-old son Thomas (right) as a 'f*****g piece of s**t' and bragged that he had 'been through more stressful things' when he learned the boy died of hypothermia in his garage

Both Valva and his fiancee, Angela Pollina (above) were arraigned in Suffolk County court in Riverhead on Thursday

Valva's estranged wife, Justyna Zubko-Valva, gave a tearful statement to the press after the hearing on Monday

'F**k a piece of s**t Thomas,' one text read. 'He's not going anywhere.'

Valva, an NYPD transit police officer, and Pollina were both arraigned in court on Thursday, according to the New York Daily News.

According to investigators, Thomas's body temperature dropped to 76 degrees on the night that he died.

Suffolk County prosecutor Kerriann Kelly accused Valva and Pollina of treating Thomas and his 10-year-old autistic brother Anthony 'in a manner that was nothing short of cruel, callous, wanton and evil.'

'The boys were undernourished,' she said.

Valva looks down and gives no expression during his court appearance on Thursday

He grimaced during the hearing as prosecutors read text messages he sent to Pollina expressing no remorse over his son's death

Pollina is seen above being ushered into the courtroom during her arraignment on Thursday

Both Pollina and Valva face second-degree murder charges in connection with Thomas Valva's death

Prosecutors allege that Pollina fixed her hair and arrived at the hospital 45 minutes after learning that her fiance's son had died

'They were literally begging for food at school, eating the crumbs off the table, eating out of the garbage cans.'

Kelly shocked those in the courtroom when she described Valva's reaction to the news that his son had died in a hospital.

'When asked if he needed anything at the hospital after his son was ultimately pronounced (dead), the defendant replied, 'I've been through more stressful things than this',' Kelly said.

Kelly also said that after Valva summoned EMTs to his home to help his already-dead son, Pollina went into the bathroom of their home to fix her hair.

'It took her about 45 minutes before she arrived at the hospital,' Kelly said of Pollina.

The children's mother, Justyna Zubko-Valva, was in court sobbing during the arraignments of her estranged husband and his fiancee.

After the hearing, she gave a statement to reporters blasting authorities for not doing enough to protect her dead son.

'What happened to my son is a clear instance of enormous corruption within the system,' a tearful Zubko-Valva said.

Zubko-Valva is seen being searched with a metal detector at the entrance to Suffolk County court in Riverhead on Thursday

After the hearing, she gave a statement to reporters blasting authorities for not doing enough to protect her dead son

'What happened to my son is a clear instance of enormous corruption within the system,' a tearful Zubko-Valva said

'The people involved have Thomas' blood on their hands.'

Earlier this week, it was learned that Zubko-Valva filed court documents warning officials that her children were being neglected and abused by Valva and Pollina.

Just days after the child's funeral, it was revealed that Zubko-Valva was worried about Thomas and Anthony after Valva received temporary custody over the children.

In September 2017, a judge granted Valva custody over all three boys and even barred Justyna from seeing her children, according to documents obtained by the New York Daily News.

'He's going to kill my kids,' Justyna reportedly told Kimberley Berens, who ran the Fit Learning school, which educated autistic children before they were sent to regular schools, during a phone call on the night of the ruling.

An outraged Berens then sent a letter to the judge, but she reportedly heard nothing back.

'What was mind-blowing was she was the most devoted mother,' Berens told the Daily News.

'I worked with Anthony for two years and saw Justyna every day. She didn't neglect a single aspect about those boys, but I didn't see Valva at the school at all.'

When Michael Valva got custody over the children, he removed them from the Fit Learning school.

Two months after Michael Valva received custody of the children, Justyna filed her first child neglect complaint in Suffolk County via the state hotline on November 7, 2017.

According to the Daily News, Justyna alleged that Michael Valva and his fiancee Angela Pollina abused her kids physically and emotionally.

Her complaint stated that the children were starved and alienated from their mother.

Justyna told the newspaper that her complaint was closed two days later with no investigation.

Another complaint was filed against Valva and Pollina with Child Protective Services in January 2019 by a school official.

'Thomas, age 7, presented a right, swollen black eye today that he didn't have within the past two days,' the complaint said, according to the Daily News.

'There is a history of physical abuse in the home involving Thomas so his black eye is suspicious due to conflicting explanations and conflicting time frames.'

That report listed Thomas and Anthony as 'maltreated'.

Zubko-Valva (pictured last week) had warned that her children were being abused by her estranged husband

In September 2017, when a judge granted Michael Valva (left) custody over their son, Thomas Valva (right), Justyna warned her son's teacher that her estranged husband was 'going to kill my kids'

Despite the claims, CPS concluded that the case did 'not rise to the level of immediate or impending danger of serious harm'.

The agency did not intervene.

A month later, another complaint was filed against Michael Valva and Pollina. This time the school official alleged that Anthony had been coming to school 'with his backpack soaked in urine'.

'Anthony has been staying in the garage and is not allowed in his room due to him urinating in his bed. As a result of the child being soaked in urine, he has a foul odor and he is extremely cold,' the official said, according to the Daily News.

Three more complaints were filed in March, May and August, but nothing was ever done.

During his funeral service Bishop Andrzej Zglejszewski said: 'Thomas was just a little boy. He just wanted to be loved, wanted to be hugged, wanted to be cherished, he wanted to be wanted. He was a gift.

'Thomas, little boy, thank you for the gift of you. Thank you for the gift of life. I am sorry that it was way too short for you. But I thank you for your beautiful life.'

The Bishop, who had baptized Thomas and delivered the homily at his funeral, told mourners that his story should inspire societal change.

He noted that the legal and social system had failed the little boy.

'Another beautiful life was lost because of our human negligence, and in so many ways, I feel that we failed this little boy,' he said.

'The system failed... We as religious and social leaders, we failed him, because we are the ones supposed to make change. We are the ones supposed to protect life.'

Thomas' death has since prompted an investigation into the social services department and how it dealt with abuse allegations against the couple and the children who lived with them.

A separate task force will examine how the department handles cases of children with developmental disabilities.

Authorities were dispatched to the home where Thomas had been living at about 9.40am on January 17 after his father said the boy had fallen in the driveway and lost consciousness while running for the school bus.

Responding officers found Valva performing CPR on Thomas in the basement.

Justyna, who buried Thomas last Thursday, also filed court documents warning officials that her children were being neglected and abused by her Valva and his fiancée

The funeral service for Thomas was held in the Long Island neighborhood of Melville last Thursday

Pallbearers carry the casket into the funeral service for 8-year-old Thomas at St. Elizabeth's Church last Thursday

About 100 mourners, including family, friends and strangers, gathered at St Elizabeth's Church for the service

The little boy was rushed to Long Island Community Hospital where he was pronounced dead.

Valva and his fiancee went on to collect donations from a GoFundMe page following the boy's death.

They were charged with his murder after an autopsy revealed that Thomas had died of hypothermia.

According to police, cameras and microphones that had been set up in Mike Valva's home captured audio of him and Angela taunting Thomas as he froze to death.

The audio files allegedly recorded the couple discussing the fact that Thomas was suffering from hypothermia, had been washed with cold water, couldn't walk and was 'face-planting' on the concrete.

Thomas' mother Justyna clutched her youngest son tightly through the funeral last Thursday

Officers stand in formation outside the funeral service for eight-year-old Thomas

They laughed as they said 'he's hypothermic' and that he had 'face-planted' the floor.

Pollina remarked: 'You know why he's falling?'.

Valva replied: 'Because he's cold.... boo f*****g hoo'.

Following his death, Thomas' brothers were placed in the custody of their mother. Pollina's daughters were placed in the custody of their biological fathers.