This handout picture taken on July 9, 2018 by the NGO Peace Winds Japan shows a miniature horse stranded on a rooftop due to the recent flooding in the Mabicho area in Kurashiki, Okayama prefecture. Image Credit: AFP

KURASHIKI: A miniature horse who survived deadly floods by swimming to a rooftop has captured hearts in Japan, as the country tries to recover from record rains that killed at least 179 people.

Leaf, a nine-year-old horse who had been a pet at an elderly care home in the town of Kurashiki, spent three days stranded on top of a house before she was spotted by aid workers on Monday as floodwaters receded.

Photos of the diminutive tan horse with a blonde mane standing forlornly on the rooftop appeared in local newspapers and made a splash on social media, providing a rare moment of levity after the country's worst weather-related disaster in over three decades.

Leaf, after being rescued from a rooftop following the recent flooding in the Mabicho area in Kurashiki, Okayama prefecture. (AFP)

Relief workers "called the fire department asking for help to rescue her, but were told rescuers were tied up saving human lives," said Keiko Takahashi of humanitarian aid group Peace Winds Japan.

Her organisation sent staff to the scene to bring down the terrified horse, who had been left to fend for herself and her baby Earth by panicked care home workers evacuating as the floods hit.

"Workers at the care facility had no other choice than to release animals as they had to flee immediately in the face of rapidly rising water," Takahashi told AFP.

She said one resident had seen a horse swimming through the floodwaters later that day.

Unfortunately, baby Earth did not survive the floods, but Leaf has been moved to a nearby farm and showered with attention, Takahashi said.

She has also been reunited with workers at the care home, who reportedly burst into tears when they found out the miracle mare had survived.