A powerful earthquake jolted southern Japan this week, rattling homes and knocking out water and electricity.

For 31-year-old factory worker Tomoko Takaoka, this meant bundling up her beloved chihuahua, Ku, and chihuahua-poodle mix, Sheri, and seeking refuge.

Unable to reach her parents, Takaoka turned to a nearby evacuation center, only to find her dogs unwelcome.

Faced with the choice of sheltering without them or staying together, she chose the latter, spending the first sweltering night crammed into her car with her canine family.

Social media posts eventually led her to Ryunosuke Animal Hospital in downtown Kumamoto.

The hospital had converted classrooms in its veterinary nurse training school into temporary housing for evacuees, with separate rooms for owners of cats and dogs.

Hospital director Ryunosuke Tokuda explained the rationale: "During disasters it's only natural for dogs and cats to stay together with their families.”

“But people who don't own pets don't necessarily want to be with them. They worry about fleas, odours, allergies, and noise. Pets are often viewed negatively, which is why many evacuation shelters often don’t allow people and pets to stay together," he said.

The hospital learned this lesson after the devastating 2016 Kumamoto earthquake, and has since opened its doors to evacuees with pets whenever disaster strikes.

Its doors immediately opened again after Tuesday's quake, which has claimed at least 36 lives and left thousands without power and running water, although services are slowly being restored.

Clutching Ku and Sheri inside a tent set up at the hospital, Takaoka was among 26 evacuees and their pets sheltering there when Reuters visited earlier this week.

Her dogs occasionally get excited when they encounter new "friends" in the shelter’s designated dog room, Takaoka said, but she calms them. She hopes she can return home soon, but more than anything, she's just happy they are together.

"They're just like family to me. I'd like to stay with them as much as possible," she said.