Mayo Stuntz: soldier, scholar, merchant, gentleman, spy.

He began his military career in the old horse cavalry, before the United States got into World War II. During the war, he was an imaginative and resourceful supply officer who coaxed from an often hidebound Army bureaucracy the weapons and gear for elite units to wage covert warfare in the South Pacific.

“By hook or crook, he managed to get them what they needed,” said Lance Q. Zedric, author of “The Silent Warriors,” a book about the war in the Pacific.

Back home, Mr. Stuntz researched and wrote histories of his home town of Vienna and the state of Virginia, where his family traced its ancestry to the 1600s. With his wife, Constance, he was author of three books on local history. For 10 years, he and his wife ran a Vienna antiques store called Antiques Uniques. He was a former president of the Fairfax Historical Society and the recipientof an award in 2012 from the Stuart-Mosby Historical Society as a “consummate and exemplary Virginia gentleman.”

For 25 years, Mr. Stuntz was in the CIA, serving in Nicaragua and Japan and at the agency’s headquarters in Langley.

He would say only that he was “an intelligence officer.”

“He was James Bond, Robert E. Lee and William Faulkner,” observed a friend and retired Navy officer, Tom Aanstoos.

Mr. Stuntz was 97 when he died May 9 at the Virginian, a retirement center in Fairfax County. He had a heart attack, said his daughter, Anne Stuntz.

Mayo Sturdevant Stuntz was born Oct. 15, 1915, in Vienna, which would be his lifelong home.

He was a descendant of the Fitzhugh family, which has been in Virginia since colonial times. Fitzhughs were friends with George and Martha Washington and neighbors of Robert E. Lee, the leader of the Confederate army in the Civil War.

In 1932, Mr. Stuntz graduated from Oakton High School. As a teenager, he worked in hotels in Virginia and North Carolina, and he later studied hotel management at Cornell University. He was drafted into the Army before receiving a degree.

The Vienna in which Mr. Stuntz grew up was a Southern country village, far different from the suburban Vienna of the 21st century. Aanstoos, a former neighbor, recalled decades-old stories of the young Mr. Stuntz “running down Chain Bridge Road with broom or rake in hand chasing after a pet pig, escaping for the umpteenth time.”

As a child, Mr. Stuntz picked up a soft Southern accent and a courtly deference to others, both of which he would retain all his life.

His World War II service was primarily with the Alamo Scouts, an all-volunteer unit made up of small teams operating from a base in New Guinea.

Their missions included forays deep into Japanese-held territory to attack enemy installations and to gather intelligence — including the locations and movements of enemy troop and supply ships.

Because the Alamo Scouts were a unique military unit, there was no prescribed table of organization setting forth the supplies and equipment to which they were entitled, said Zedric, the “Silent Warriors” author. Mr. Stuntz relied on his own wit and persuasion to get his troops what they needed: rubber rafts, paddles, special weapons, ammunition, climbing gear, shovels, rain gear, hip boots and knives large enough to clear paths in dense tropical jungles.

As the unit’s missions accumulated, the Scouts brought back war souvenirs — Japanese guns and swords, flags, insignia, medals, uniforms — that could be bartered for hard-to-get caches of food and equipment. So resourceful was Mr. Stuntz, Zedric said, that his unit was able to acquire not only the best combat equipment but also such rarities as fresh meat and ice cream. Food in the Alamo Scouts’ chow hall “was among the best in the South Pacific,” he said.

In January 1945, Mr. Stuntz was transferred from the Alamo Scouts and named supply officer for all of the U.S. guerrilla units operating in the Philippines.

The Alamo Scouts were disbanded in November 1945, but in 1988 the unit was officially recognized as a predecessor to the Army’s Special Forces.

After the war, Mr. Stuntz was an assistant manager at the old Statler Hotel in Washington for five years before joining the CIA, where he remained until retiring in 1975.

For more than 35 years after that, he devoted his time to local history.

With his wife, he produced “This Was Vienna, Virginia,” “This Was Tysons Corner, Virginia,” and “This Was Virginia, 1900 to 1927,” a collection of photographs.

Survivors include his wife of 66 years, Constance Pendleton Stuntz of Vienna; three children, Anne Stuntz of Vienna, Reid Stuntz of Alexandria and Mayo Stuntz Jr. of Mamaroneck, N.Y.; eight grandchildren; and a great-granddaughter.

In the final years of his life, Mr. Stuntz took to wearing a Greek fisherman’s cap as he went around Northern Virginia on his daily business.

He was buried in it, along with a bottle of Virginia Gentleman whiskey and two cigars.