A Wyandanch woman has been charged with animal cruelty after she left a 2-year-old shih tzu by the side of a highway, officials said Monday.

The Suffolk County SPCA said a passerby saw the dog in a metal crate abandoned on a guardrail on the south side of Sunrise Highway in Babylon on April 14.

advertisement | advertise on newsday

The dog’s hair was severely matted and the passerby took it to a veterinary clinic, SPCA Chief Roy Gross said.

Investigators were able to trace the dog to Yvette O’Connor, 39, and she was charged Sunday with separate counts of animal cruelty and abandonment, both misdemeanors, Gross said.

He credited “a lot of good detective work” with finding O’Connor, but he declined to be specific.

“The real hero here is the good Samaritan who found the dog and took it to a clinic,” Gross said.

advertisement | advertise on newsday

O’Connor, who could not be reached for comment, was scheduled to appear in First District Court in Central Islip on July 17 to answer the charges, the SPCA said.