Shortly before Thanksgiving last year, Mayor Marion Barry faced a tough decision.

His inspector general had uncovered three canceled checks that could potentially incriminate Ivanhoe Donaldson, for more than a decade Barry's closest political adviser. Barry had to decide whether to turn over the checks to a man who, the mayor has charged publicly, is out to get him -- U.S. Attorney Joseph E. diGenova.

In the end, Barry sent the checks to diGenova's federal prosecutors, kicking off a grand jury investigation into whether Donaldson may have misused about $30,000 in city funds in 1981 when he was director of the D.C. Department of Employment Services.

An aide to Barry said recently that the mayor was concerned about "the integrity of the mayor's office," and also did not want to be vulnerable to any possible cover-up charge.

"He did it because of the feeling it was the right thing to do and because you didn't know what the other stuff was that might surface or who would come up with what," the Barry aide explained. "It wasn't the easiest thing he's done."

Barry and Donaldson met during the civil rights days as members of the Student Non-Violent Coordinating Committee (SNCC). Many believe that Barry owes much of his success to Donaldson, a consummate political strategist and a feared infighter.

The two seemed inseparable, even after Donaldson resigned as deputy mayor for economic development in October 1983 to become a vice president in the Washington office of E.F. Hutton & Co. Inc., the investment and brokerage firm. Last year, Barry helped Donaldson win election as chairman of the D.C. Democratic State Committee.

While Barry made the final decision to turn over the checks, a number of others were involved in the discussions. They include Joyce Blalock, the inspector general whose staff first turned up the checks; City Administrator Thomas Downs, who reviewed the evidence with Blalock and then took the bad news to the mayor; and Herbert O. Reid Sr., the mayor's legal counsel and another longtime adviser.

Barry was touring Africa when stories about the grand jury investigation broke in December. Since his return to Washington on Christmas Eve, he has declined to comment on the investigation.

Donaldson could not be reached for comment.

The grand jury is investigating whether Donaldson, while head of the Department of Employment Services, issued three checks from a special administrative account in the names of two longtime friends and one other person and then had the checks cashed and pocketed the proceeds, sources said.

One of the friends, Charles E. Cobb, a journalist and former civil rights worker with Donaldson, said in an nterview last year that he told the grand jury he never worked for the city and never received city money.

The investigation of Donaldson, 43, has stunned the District's political establishment, where he is well-known for his brains and his savvy. City Council member Frank A. Smith Jr. (D-Ward 1), another former SNCC activist, said many of Donaldson's friends, while dismayed by the reports, are standing by Donaldson during his crisis.

"No matter what happens, his reputation has been damaged somewhat," Smith said. "But whatever the result of the case, history will be generous in assessing him . . . . Ivanhoe's contribution to the social revolution and elected black leaders is probably greater than any other."

Despite his broad experience in national and local politics, Donaldson is an extremely private person and little is known about his business ventures, which have included an investment in a local restaurant holding company, a short-lived beverage distribution business that lost money and a private consulting firm.

Last year, Donaldson was hired as a part-time consultant and elected to the board of directors of Datacom Systems Corp., a wholly owned subsidiary of Lockheed Corp. Datacom, a computer and parking management firm, holds several contracts with the D.C. government.

Donaldson, a slender man with sharp features, has enjoyed a comfortable, if not ostentatious, life style. He and his wife Winifred, a $40,158-a-year special assistant in the D.C. public works department, own a condominium apartment on Wyoming Avenue NW that has an assessed value of $145,600. Donaldson owns a Mercedes and plays tennis at a private club in Arlington.

D.C. Superior Court records show that Donaldson was sued by a Virginia bank in 1981 for an outstanding Visa credit card bill and paid $3,015 the following year. Private contractors involved in the remodeling of his condominium also sued him, and he paid them more than $9,000 after protracted legal skirmishes between 1980 and 1983, the records show.

Donaldson, the son of a New York City policeman, studied engineering at Michigan State University before dropping out to work full time in the civil rights movement. During the 1960s, he worked as a SNCC organizer in the Deep South.

Later, he held a number of academic posts -- resident fellow at the Institute for Policy Studies, a liberal think tank; program officer with the Cummins Engine Foundation in Columbus, Ind.; teacher in the Afro-American Studies Department of the University of Massachusetts in Amherst.

Donaldson gained national recognition as a political strategist by helping to elect a number of prominent black leaders, including Georgia state Sen. Julian Bond, Mayor Richard Hatcher of Gary, Ind., and, more recently, Mayor Harold Washington of Chicago.

Donaldson also has managed Barry's political fortunes. He ran Barry's successful 1974 campaign for City Council and directed both of his successful mayoral campaigns, n 1978 and 1982.

Donaldson held a number of key posts in Barry's two administrations, including his tenure as the head of the Department of Employment Services from fall 1980 through May 1982. After that he became one of three deputy mayors in a new table of organization that he helped devise.

As a political manager and city official, Donaldson was known as tough, confrontational and demanding. "Thin-skinned people or people with a low self-esteem don't last long with Ivanhoe," said a former Barry campaign worker and city employe. "There's no cuddling with him. But if you can get past the abrasiveness, if he likes you . . .he'll give you every opportunity you can handle."

One of those who prospered under Donaldson was Matthew Shannon, a lawyer and former Barry campaign aide, who succeeded Donaldson as director of the Employment Services Department. It was Shannon's handling of the department that triggered a series of events that eventually led to Donaldson's current predicament.

The Donaldson case grew out of a probe of the department that began last July after Shannon alerted police to possible improper purchases made by a private contractor hired to run one of his agency's job training programs.

The allegations were embarrassing to Shannon because the contractor, Clarence B. Wade Jr., was the boyfriend of Shannon's sister and was living with her in an apartment here. Shannon had arranged to get Wade his work with the city, according to Wade and statements made in court by prosecutors.

The FBI was called in and the investigation was turned over to the U.S. attorney's office. A grand jury in U.S. District Court began hearing evidence about contracts and purchases made by the department, which handles most of the city's job training programs and administers the District's multimillion-dollar unemployment and workers compensation programs.

Wade was later charged along with two department officials, Crystal Willis, the department's chief fiscal officer, and Dwayne Moore, the head of the agency's support services unit, with using city funds to buy for themselves more than $4,000 in lamps, chandeliers and other electricial fixtures. Willis and Moore, who were fired from their city jobs, are awaiting sentencing after pleading guilty to felony charges connected to the purchases. Wade yesterday entered a guilty plea to several charges.

That criminal probe led Barry to order Blalock to conduct a separate investigation of financial controls in the department.

One account that Blalock and her aides examined was a special administrative fund connected with the department's unemployment compensation program. It was here that the checks were found that triggered the Donaldson investigation.

The obscure fund, which at times has as much as $250,000, was separate from the city's centralized accounting system run by the controller's office. Donaldson and other employment services directors could authorize and sign checks drawn on the fund on their own authority. Records were kept in a handwritten ledger maintained in the department.

On Oct. 1, Barry announced that Blalock had completed a "thorough review" and that several steps had been taken to tighten controls. Barry said that "no discrepancies" had been found in the special administrative fund, but that the fund had been transferred to the city controller's office "for greater security." There was no mention of the three checks issued by Donaldson.

Sources said Blalock became concerned about the documentation for the three checks.

Blalock, a former Pentagon lawyer who has kept a low profile in the five years she has worked for Barry, found herself in the position of asking potentially embarrassing questions about one of her boss' closest advisers.

Sometime last fall, sources said, Donaldson -- the man who, on behalf of the mayor, had often been the one to ask city bureaucrats the tough questions -- had to appear before Blalock to answer her questions about the checks. About that time he retained Willie Leftwich, a well-connected local attorney who does not specialize in criminal matters.

Cobb supplied Blalock with a written statement, as did Judy Richardson, another longtime Donaldson friend whose name appears on one of the checks, sources said.

Blalock, who reports to Barry through City Administrator Downs, notified Downs of her findings. A career government manager who joined the Barry administration after stints as an administrator in Leavenworth, Kan., Little Rock, Ark., and with the federal government, Downs is not part of Barry's close-knit circle of social and political friends. Yet it was he who took Blalock's findings to Barry.

Barry almost immediately sought the advice of Reid, a former civil rights lawyer and Howard University law professor who has known Barry for 20 years and serves as one of his top advisers.

In mid-November, Blalock took the checks to diGenova.

In December, Cobb was summoned before the grand jury to testify about Donaldson. He said in an interview that he told the grand jury he did not receive a $4,500 city check issued in his name or any proceeds from it. A city employe who worked in the Employment Services Department when the Cobb check was issued told the grand jury, according to sources, that Donaldson gave her the check and asked her to cash it. Sources said she told the grand jury she deposited the check and gave the $4,500 to Donaldson.

By late December, Donaldson had hired criminal lawyer Robert Watkins of the firm of Williams & Connolly.

Suddenly what began as a city inspector general's audit of the Employment Services Department had mushroomed into a full-fledged criminal investigation of the mayor's most trusted adviser.