Elmer B. Staats, who as comptroller general of the United States directed the auditing and investigative arm of Congress for 15 years, died of congestive heart failure July 23 at Sibley Memorial Hospital in the District. He was 97.

From 1966 until he retired in 1981, Mr. Staats was chief of the General Accounting Office. He presided over its transformation from an agency that concentrated on examining vouchers and checking the legality of federal payments into one that measured cost-effectiveness and the results of a vast array of federal programs.

He presided over the expansion of the GAO’s investigative territory into just about every cranny of the federal establishment. “The Central Intelligence Agency is the only agency of government we don’t audit,” he told the New York Times in 1981.

Mr. Staats worked in the federal service for more than 40 years. His career coincided with an expansion of the federal role from an era of relatively limited activity before World War II to a time of ever-increasing federal involvement in the lives of most Americans by the time he retired.

In the early 1980s, he served on a three-member board with Treasury Secretary G. William Miller and Federal Reserve Chairman Paul A. Volcker that gave preliminarily approval to more than $1 billion in federal loan guarantees to stave off automaker Chrysler’s impending bankruptcy.

Mr. Staats began his federal career in 1939 at what was then known as the Bureau of the Budget and worked in the administrations of nine presidents, from Franklin D. Roosevelt to Ronald Reagan.

Once at a Christmas party in the waning days of President Dwight D. Eisenhower’s administration, Mr. Staats was given a seat cushion with a Republican Elephant on one side and a Democratic Donkey on the other.

“Elmer the Survivor” was the intended message, The Washington Post reported in 1981. But there was another message: “Elmer the Hardworking Professional, the Consummate Bureaucrat.”

As head of the GAO — now known as the Government Accountability Office — Mr. Staats had a reputation for a low-key style of management with a scrupulous attention to detail and a dry sense of humor.

On his retirement, The Post wrote that he “kept members of both parties happy, a sign of evenhandedness, according to admirers, a sign of timidity, according to critics. He has taken the GAO from the world of straight financial audit to the more complex world as evaluator of government programs.”

A resident of Washington, Elmer Boyd Staats was born in Richfield, Kan., on June 6, 1914. He graduated from Kansas’s McPherson College in 1935 and, the next year, received a master’s degree in political science and economics from the University of Kansas. He received a doctorate in political science at the University of Minnesota in 1939.

His career with the Bureau of the Budget — which later became the Office of Management and Budget — included service as deputy director under Presidents Eisenhower, Kennedy and Johnson.

His most notable achievement as head of the GAO, he told the New York Times in a retirement interview, was a 1972 audit of President Richard M. Nixon’s reelection committee that showed campaign contributions had been used to finance the break-in at Democratic National Committee offices at the Watergate complex.

At his retirement, the GAO was producing more than three reports a day, but there remained critics who contended that they took too long to complete and were sometimes watered down or killed in the face of perceived offenses to influential members of Congress.

For example, a report critical of the Army Corps of Engineers’ cost-benefit ratio on the Tennessee-Tombigbee Waterway, which ran through parts of Mississippi, was shelved after complaints by Sen. John C. Stennis (D-Miss.).

In retirement, Mr. Staats served on several corporate boards. He was a trustee of American University and a member of the Cosmos Club, the Chevy Chase Club and Metropolitan United Methodist Church in Washington.

In 1940, he married Margaret Shaw Rich, who died in 1992.

Survivors include three children, David Staats of Sarasota, Fla., Deborah Sanders of McLean and Catharine Taubman of Breckenridge, Colo.; three granddaughters; and a great-granddaughter.

In his personal life, Mr. Staats was a golfer and gardener. Like millions of other Americans, he kept a “victory garden” during World War II. It was not his first agricultural task.

Growing up in Kansas, he worked for a farmer who paid him 15 cents a day but charged him 5  cents a day for water. “I was worth every penny of it,” his son quoted him as saying.