A pair of New York police officers saved a cat and dog from a burning house Friday after two children escaping the flames told them their pets were trapped inside.

Officers Sergio Rivera and James Galanos arrived at a burning home at 3 Oak Street in Central Islip, N.Y., around 3 p.m. and encountered two boys, 11 and 13, fleeing out the front door, according to the Suffolk County Police Department.

Police told Fox News the boys' mother had run out to a nearby store and "was only gone for a short time."

Officer Rivera is on the left holding the Chihuahua, JJ. Officer Galanos is on the right.

Officer Rivera is on the left holding the Chihuahua, JJ. Officer Galanos is on the right. (Suffolk County Police Department)

The officers entered the burning home through the back door and spotted the cat, a 2-year-old named Tiger, who ran away from the flames toward the basement door, according to authorities.

AT LEAST 7 INJURED IN NEW YORK AS VEHICLE PLOWS THROUGH OUTDOOR DINING AREA

Due to thick smoke clouding their vision, they couldn’t find the dog, a 2-year-old chihuahua named JJ, until they heard him whimper from inside a cage near a couch, "in close proximity to the fire."

Rivera snatched up the cage and the officers ran out of the house.

Tiger the cat was safely retrieved.

Tiger the cat was safely retrieved. (Suffolk County Police Department)

Galanos went back inside, police said, to make a second attempt at saving Tiger.

The cat was hiding in the basement, and the Galanos retrieved him safely.

Central Islip firefighters extinguished the flames at the house on Oak Street.

Central Islip firefighters extinguished the flames at the house on Oak Street. (Suffolk County Police Department)

Neither the boys nor their pets were injured. Nor were any police officers or responding firefighters, a department spokesman said.

CLICK HERE TO GET THE FOX NEWS APP

Firefighters eventually doused the flames, and arson detectives were investigating the cause of the fire.