Imagine a dog that survived being bombed from the air, the warship she was on sunk from under her. Pretty amazing, right? For Judy, the purebred English pointer and heroine of my new book, No Better Friend: One Man, One Dog, and Their Extraordinary Story of Courage and Survival in WWII, that was just a warmup act.

Judy also made it through a second sinking at sea, this time courtesy of a torpedo attack. She nearly drowned after falling overboard in the Yangtze river, was slashed by a hungry crocodile, and took a rifle bullet to her shoulder.

Most incredibly, and importantly, Judy made it through more than three years of being imprisoned by the Japanese as WWII’s only official animal prisoner of war, a designation won for her by her best friend, an airman named Frank Williams, who formed an uncommon bond with Judy.

Both Judy and Frank were in Singapore at the outbreak of war in the Pacific. Singapore was supposed to be a British citadel, but the Japanese captured it so swiftly that civilians and military personnel swarmed the few ships available to take them off the island. Unfortunately, the Japanese sunk this makeshift armada almost in its entirety, scattering survivors across the South China Sea.

Frank, too, made it to liberation, though he struggled at times with thoughts of suicide and/or killing Judy himself, so that neither would suffer without the other. But Judy’s wet brown eyes and stalwart loyalty pushed those ideas away.

Judy and others who made it off her ship, the HMS Grasshopper, washed ashore on a tiny spit of coral called Posic. Using her incredibly powerful nose, Judy discovered fresh water buried under the sand, thus saving the lives of everyone on the atoll. Rescued after a week, Judy led a small party on a grueling trek across the Sumatran jungle, plagued along the way by crippling heat, sucking mud, irritating mosquitos and leeches, and dangerous crocodiles. One of those scaly reptiles lunged at Judy while the dog was trying to scare it away from her human friends. A fatal clawing was averted by millimeters.

Judy emerged from the bush alive, only to be taken prisoner and held in Sumatra, the largest island in the Indonesian chain. Months later, she was at a second camp, and edging toward starvation. One day Frank gave the skinny pointer his entire bowl of rice, and a lasting friendship was born.

Frank taught Judy how to quickly scurry away from menacing guards when prompted by his snaps and whistles. He also undertook a daring gambit to help protect the dog. By offering one of Judy’s new puppies (yes, she had a litter while a prisoner!) as a gift to the Japanese commander of the prison, he bargained for the dog to receive official POW status. She became prisoner #81-A, and this status prevented the camp’s next commander from killing Judy, as he wanted to do.

Frank smuggled Judy onto a “hell ship,” a steamer used to transport prisoners stuffed like sardines in cargo holds, when he was transferred to a different camp. Unfortunately, a British submarine destroyed the steamer, not knowing it was carrying friendly POWs. Frank tossed Judy out a porthole and both were soon swimming for their lives. Judy helped rescue survivors by dragging them to floating debris. She was then reunited with Frank in the next camp, after the airman had given up hope of ever seeing his friend again.

But the travails continued. Frank and Judy were sent to help construct a railway across Sumatra, a boondoggle project seemingly designed to work the POWs to death. It nearly succeeded. Disease, malnutrition, wilderness, and angry guards thinned the ranks of the prisoners. But Judy managed to survive. She had an uncanny knack for disappearing into the dark, dense bush, often at the sound of Frank’s hurried whistles or shouts. One time, a guard’s bullet did graze her, but otherwise she emerged unscathed.

Frank, too, made it to liberation, though he struggled at times with thoughts of suicide and/or killing Judy himself, so that neither would suffer without the other. But Judy’s wet brown eyes and stalwart loyalty pushed those ideas away.

Other POWs drew strength from Judy’s example as well, and staggered on despite the agony of 18-hour workdays and starvation rations.

Upon return to the U.K. after the war, Judy was awarded the highest honor an animal could receive, the Dickin Medal, for her courage and service.

After an epic 14-year life, she died by Frank’s side in Africa in 1950, a brave adventurer to the end.

Robert Weintraub is a sports columnist for Slate, and his writing has also aired on ESPN, ABC Sports, CBS Sports, and dozens of other outlets. He is the author of "No Better Friend: One Man, One Dog, and Their Extraordinary Story of Courage and Survival in WWII" (Little, Brown and Company, May 5, 2015). He is also the author of "The House That Ruth Built" and "The Victory Season."