WASHINGTON (AP) _ A bet that Harry Truman would win the 1948 election made Joseph Nunan $1,800 richer. But the bet came back to haunt the former Internal Revenue Service commissioner, who wound up getting convicted of tax evasion when he failed to report that and other winnings on his tax return.

Nunan's story is part of a warts-and-all, closely held history of the IRS Criminal Investigation Division, an account studded with celebrities such as Charlie Chaplin and gangster Al Capone.

And there are the less glamorous cases, such as when the IRS cracked a tax evasion scam in which 82,000 pounds of margarine was being peddled as ``pure creamy butter.''

The history also describes numerous cases of crooked tax collectors busted after being on the take from bootleggers in the 1930s or running tax scams on wealthy businessmen.

The unusual peek into the IRS' inner workings provides context as Congress works on legislation that would make the biggest changes at the IRS in four decades, increasing accountability and revamping management.

Don't expect to find this tome in your local bookstore. The 202-page history, a virtual Who's Who of white collar crime since 1919, is labeled ``confidential'' and ``for official use'' by the IRS.

The book's existence surfaced in Tax Notes, a Virginia-based industry magazine; The Associated Press obtained a copy. The IRS, in response to a Freedom of Information Act request, has released a heavily censored version covering 1919 through 1987; the uncensored version obtained by the AP goes through 1994.

IRS spokesman Steve Pyrek said 10,000 copies were produced to commemorate the 75th anniversary of the Criminal Investigation Division in 1994.

Much of the book details busts of gambling rackets and extortionists, including cases against the IRS' own employees.

Nunan, who was IRS commissioner from 1944 through 1947, was indicted in 1952 on five counts of income tax evasion.

At Nunan's trial, one issue concerned unreported gambling winnings, particularly an $1,800 bet Nunan won on the outcome of Truman's election. Nunan's gambling partner gave the former commissioner, ``who was backing Truman, odds of 9 to 1,'' against Republican Thomas Dewey, the history said.

The book's introduction promised a description of ``the many tricks and artful devices of the tax dodger,'' and said, ``Whatever the guise or method he may use, the man who seeks to cheat his government rides eventually to a fall.''

The history includes some of the agency's proudest moments, such as its much celebrated role in the conviction of ``Public Enemy No. 1,'' Chicago mobster Al Capone, on tax evasion charges.

In the aftermath of the Capone case, collections from delinquent returns doubled in 1931 over 1930, the book recounts. ``The indirect results of the Capone prosecution were most beneficial,'' it said.

Less known is its role in helping crack the 1932 Lindbergh baby kidnapping and murder case.

IRS agents traced the serial numbers of gold certificates that Charles A. Lindbergh paid to Bruno Richard Hauptmann for release of the aviator's son.

Hauptmann was arrested in 1934 after money he used to pay for gasoline was traced and discovered to be the ransom bills. IRS special agents also analyzed Hauptmann's personal finances, and were able to show an increase in his net worth timed with receipt of the ransom money.

``If it had not been for your service being in the case, Hauptmann would not now be on trial and your organization deserves full credit for his apprehension,'' Lindbergh wrote in a letter to the IRS.

Lindbergh's biographers acknowledge the importance of tracing the ransom money, but they also cited evidence developed by handwriting experts and even Agriculture Department specialists who traced pieces of a broken wooden ladder used in the kidnapping.

One of the agency's darker incidents also occurred around that time, when IRS agents tried to extort $37,500 from oil magnate Henry F. Sinclair. They said they could reduce his proposed taxes from $264,000 to $30,000.

Sinclair's attorney alerted the IRS, then met with the rogue agents and made a $10,000 down payment. IRS internal inspectors intercepted the agents as they left, finding the $10,000 check in a straw hat belonging to one of them. The agents were indicted for attempted extortion and fired.

The report also describes tax evasion cases against business leaders, musicians and actors, including Charlie Chaplin. It gave few details of that case, except that taxes and penalties stemming from one of Chaplin's investment partnerships totaled $1.17 million.

One Chaplin biographer said the silent screen star paid a $500,000 income tax debt in 1958.