A Baldwin man left his dog’s kidney stones and groin affliction untreated for a year, then turned the emaciated pet over to a shelter, Nassau County authorities said.

Jason Armstrong, 34, was arraigned Tuesday on a charge of failure to provide sustenance to animals, a misdemeanor that carries up to one year in jail.

Armstrong gave up the Yorkie, JJ, at the Hempstead Town animal shelter on May 16, according to court documents.

The dog could barely stand and was “alarmingly thin,” investigators said. JJ weighed 3 pounds — about half the normal weight for a 5-year-old Yorkie.

Although Armstrong said the dog had stopped urinating and eating, JJ ate “like he hadn’t eaten for days” when the shelter staff gave him baby food, according to the investigation by the district attorney’s animal crimes unit.

Veterinarians found the dog had severe tartar disease, an older fracture in his tail, bad teeth and a stone blocking his bladder, authorities said.

advertisement | advertise on newsday

Armstrong was released on his own recognizance. He could not be immediately reached Tuesday night and was represented by Legal Aid, which has a policy of not commenting in the early stages of a case.

Investigators spoke to Armstrong and learned he had taken JJ on April 19, 2016, to a Malverne veterinarian, court documents said. The veterinarian told investigators that she informed Armstrong the dog was in great pain and required immediate surgery.

But Armstrong did not want to pay for the treatment and left after JJ’s pain was temporarily relieved, authorities said.

After the Yorkie was given up at the shelter, surgeons removed the blocking kidney stone and resolved his painful groin condition, officials said.

Two days after the surgery, “JJ went from visibly in pain and fearful to lovable,” according to court papers. The Yorkie has since been adopted.

“Every pet deserves a loving home,” District Attorney Madeline Singas said in a statement, “but this defendant is charged with heartbreaking neglect that caused an innocent animal to unnecessarily suffer and nearly die.”