The formal surrender of Japan was held in Tokyo Bay on Sept. 2, 1945 — weeks after two atomic bomb blasts brought an end to years of carnage. Emperor Hirohito had called on Japanese to "endure the unendurable," forfeiting the cause that led millions of his countrymen to their graves.

World War II was over, but not for Hiroo Onoda. A lieutenant in the Imperial Japanese army, Onoda spent another 29 years hiding in the jungle of an isolated Philippine island.

The Japanese government spent a small fortune trying to alert stragglers like Onoda about the war's end, but he dismissed it as enemy propaganda. He stuck to his gun and headed back into the bush in the service of his emperor, bracing for an enemy that didn't exist anymore.

For Onoda, who continued beyond belief to follow wartime orders, loyalty was not only blind but deaf.

He emerged in 1974, emaciated but still sporting what remained of his old uniform. Onoda, who died Thursday at age 91, was the last Japanese soldier to come out of hiding in the Philippines, having survived on thievery, asceticism and undeviating will. Onoda said he thought of "nothing but accomplishing my duty."

To many Japanese at the time, he embodied pre-war virtues of endurance, obedience and sacrifice — qualities increasingly antiquated as the country transformed from the devastation of war into an economic powerhouse and a hive of materialism.

At the time of Onoda's surrender, the Japanese ambassador to the Philippines declared him the "paragon of the Japanese soldier."

Other Japanese soldiers from World War II lived on for decades, guerrilla-style recluses in the jungles of Guam and Indonesia, but Onoda stirred the deepest emotional and nostalgic response. Where other army stragglers stayed hidden reputedly out of fear of execution, Onoda remained committed to his mission of counting American bombers.

His orders: "To continue carrying out your mission even after the Japanese Army surrenders, no matter what happens."

The cost was extreme. When he left the jungle at long last, he met a world where Richard Nixon was the U.S. president, where the Cold War and the nuclear age dominated politics, where skyscrapers towered, and where television was inescapable. He did not marvel at the small-screen technology, noting that it "irritates my eyes."

If he seemed lost in the new world, some circumstances of his youth seemed to have remained the same. He said he was restless when he returned at last to his home region in central Japan and settled in with his octogenarian parents who had long believed him dead. He did not get along with them when he was a teenager and time had not changed a thing, he said. He soon returned to isolation, only this time as a rancher in Brazil.

A teacher's son, Hiroo Onoda was born March 19, 1922, in Kainan, Japan. He completed high school in 1939 and worked for a Japanese trading firm before he was called to army service.

The Japanese invasion of the Philippines began shortly after the Dec. 7, 1941, attack on Pearl Harbor, and its occupation for the next several years led to atrocities including the Bataan Death March. Onoda, a graduate of the imperial army intelligence school, was assigned to Lubang, an island about 90 miles southwest of Manila, in December 1944.

Just two months earlier, U.S. General Douglas MacArthur's forces had begun retaking the Philippines, starting with Leyte island. By March 1945, Manila was officially liberated, although scattered resistance continued until the war's end.

Onoda and a few other soldiers went underground, waging a low-level guerrilla campaign while still in their old fatigues. One of the men surrendered a few years after the war and others were fatally shot in gun battles with the Philippine police — reinforcing his belief, he said, that the war was still on.

As the decades passed, Onoda's family made attempts, via loudspeaker and dropped leaflets, to urge him out of hiding. He later professed to disbelieve the war was truly over, claiming that attempts to lure him from hiding were Allied propaganda. But as he got older and a life of banditry became more difficult for him, he seemed more amenable to reality when he crossed paths in February 1974 with a young Japanese adventurer, Norio Suzuki, who had gone in quixotic pursuit of Onoda.

As farfetched as his nearly 30 years in isolation seemed, Onoda explained to Suzuki that if the war were truly over, why had he never received orders from his superiors?

Suzuki took this message back to Japan, where the military located Onoda's superior officer, Maj. Yoshimi Taniguchi, who had gone on to a career as a bookseller, and arranged for his transport to Lubang.

Onoda stood to attention with his regulation army rifle as Taniguchi read out the imperial army's proclamation of surrender from 1945. As Time magazine reported of this "wartime Rip van Winkle," Onoda "bowed stiffly in acknowledgment that his war was over — and then proceeded to brief his commander about his 29 years of intelligence gathered on 'enemy movements.' "

Soon after, in Manila, the 52-year-old Onoda formally surrendered to Philippine President Ferdinand Marcos. Onoda presented his rusted samurai sword, and Marcos returned it after pardoning the old soldier for crimes he may have committed. Onoda and the men with him admitted to stealing rice, bananas and cattle, and were suspected at times of killing and wounding Filipinos who came upon the soldiers.

Onoda's story became a sensation. He received a hero's welcome in Japan, where politicians have long paid tribute to nationalistic and militaristic traditions even as the country's post-World War II constitution renounced war "forever."

Thousands of onlookers welcomed him back to Tokyo. The Japanese prime minister, Kakuei Tanaka, wrote a celebratory message in Onoda's honor: "The air of a heavenly hero will prove awesome through a thousand autumns."

He was also feted in dubious corners of the world. The Ugandan dictator Idi Amin said Onoda's dedication to a cause would make him an ideal morale-builder for Uganda's army.

Tired of soldiering, Onoda decamped for a ranching enclave in the Brazilian interior populated by dozens of Japanese families. In 1976, he married Machie Onuki, 38, a former tea-ceremony hostess from Tokyo. They later led a school in northern Japan that taught wilderness survival skills to youngsters, who called him "Uncle Jungle."

Onoda died at a hospital in Tokyo, the government announced. No cause was reported.

Onoda, whose ghostwritten memoir was called "No Surrender," bemoaned what he called a lack of self-reliance among contemporary Japanese. He once told Reuters that he advised parents to let their children play in the soil and dirt, even when it was raining.

"Too much concrete and cleanliness makes for weak children," he said.