SAN FRANCISCO -- Four years ago, when E. Robert Wallach was preparing to move to Washington to be in closer touch with his friend Edwin Meese III, he decided to throw himself a farewell luncheon.

The guests thought Wallach was having just two or three friends, as he often did, and were astonished to be directed to the upstairs of Jack's, a popular downtown restaurant, for a gathering that included a blend of Republicans and Democrats, old friends and professional acquaintances, including three California Supreme Court justices and four appellate judges.

"Bob got up and made a speech," recalled one judge who was at the lunch. "It was simply astounding. He described Ed Meese as a really progressive, sensitive person who was concerned about people . . . . He said, 'I meet Ed Meese daily -- he's the second most powerful man in America -- or maybe in the world . . . . Through me, you can send messages to this man.' "

Wallach's claims may have seemed like boasting. But in fact the close relationship between the flamboyant San Francisco lawyer and the attorney general of the United States enabled Wallach to exert a strong influence over Meese and, ultimately, to ensnare him in scandal.

It was because of Wallach that Meese became involved with the Wedtech Corp., the obscure South Bronx company that became a multimillion-dollar defense contractor. Federal grand jury investigations in Washington and New York are examining the role played by the two friends in the company's rise. Those investigations already have produced 16 indictments on charges ranging from racketeering and obstruction of justice to grand larceny, wire fraud, extortion and bribery.

By all accounts, they are an odd couple: Meese, the hard-line conservative attorney general, and Wallach, a self-described liberal Democrat who once ran for the Democratic senatorial nomination in California on a platform of decriminalization of marijuana and opposition to nuclear power.

Meese, 56 and burly, has a reputation as a solid family man and as a straightforward, even plodding, government prosecutor. Wallach, 53, is diminutive, with intense eyes and large, bushy eyebrows, whom acquaintances describe as a man of contradictions.

A successful personal injury lawyer, Wallach surprised his California friends more than a decade ago with a dramatic change in life style after he separated from his wife. Up to then, friends said, he was a prim, almost prudish man, who was regularly seen around town in a battered Rambler. Afterward, they saw him in expensive sports cars, often in the company of attractive young women. They were even more surprised when he began to spell his name in the lower case, "e. robert wallach."

And they were astounded at the start of the Reagan administration when Wallach, who had been outspoken in describing himself as a liberal Democrat, began billing himself as the right-hand man for Meese.

Even people who have known Wallach many years said they do not understand his relationship with Meese and are not certain whether Wallach considers Meese a true friend or simply has been using him to further his own driving ambitions; however, the relationship appears to be close. Meese declined requests for an interview.

In 1982, when Meese's son Scott died in an automobile accident in suburban Virgina and Meese and his wife, Ursula, were out of town, Wallach assumed the task of identifying the body, handling many initial details and helping ease the Meese family through its grief.

Wallach later gave Meese a painting of an American eagle in Scott's memory and last year accompanied the Meese family on a trip to Israel, where he arranged for a grove of 1,000 trees to be planted just outside Jerusalem and dedicated in Scott Meese's memory.

When Meese faced an independent counsel's investigation in 1984 after his nomination as attorney general, he turned to Wallach to handle his defense. And, since February 1986 an authorization at the reception desk of Wallach's Foggy Bottom condominium has allowed Meese family members to use the apartment at any time.

By Wallach's own account, it was his friendship with Meese that prompted Wedtech to seek his assistance in 1981 in overcoming Defense Department resistance to a military contract. And it was that friendship that persuaded Meese, then counselor to President Reagan, to intervene to ensure Wedtech got "a fair hearing." Wallach has confirmed that he later received more than $1 million in cash and stock from the company.

Wedtech not only got "a fair hearing," it also got the contract and a firm foot in the door with the Reagan administration. Before long, it had won more than $250 million in government contracts, most of them no-bid awards through the Small Business Administration (SBA). Then, last year, Wedtech became entangled in an expanding federal-state investigation of corruption in New York City. Wedtech's lobbying in the nation's capital soon became a focal point of the probe and the springboard for a separate Washington-based investigation.

"It's like a big, juicy pie, with a lot of people walking away from it licking their fingers," Bronx District Attorney Mario Merola said last fall. "What we're trying to find out is whether any laws were violated and, if so, who has the jurisdiction."

As Wallach sees it, he is a victim. "I have found I am such a babe in the woods," he said in an interview at his California law office. He said Wedtech executives worked so hard that he finds it difficult to believe they were crooked, even if they have admitted plundering the company treasury and bribing federal, state and local officials. "If they were crooks," Wallach said, "they worked endlessly."

Washington lawyer Leonard Garment, a friend and cocounsel with Wallach in the earlier Meese investigation, depicts Wallach as an ideal ally for a minority company from the Bronx where Wallach was born.

"They're 'his guys,' " Garment said. "These wonderful guys in this deteriorating part of America called the South Bronx -- that's what he wanted to see, and that's what he did see . . . . If they want to indict him for naivete, I will represent him and plead him guilty."

Meese and Wallach met in 1957-58, their final year at Boalt Hall, the University of California law school at Berkeley. Meese came from a devout German Lutheran family that settled in California in the mid-1800s. His grandfather was a city councilman; his father, Alameda County tax collector.

Wallach, by contrast, was a small, intense Jewish boy from the Grand Concourse. His parents met in a ladies' hat factory in Harlem where his father was foreman and his mother forelady.

"They were divorced when I was 7, and my mother and I went to Los Angeles," Wallach said. "She became a 'Rosie the Riveter' for Lockheed Aircraft, making bomb-bay doors on B17s. We arrived just at the beginning of the war."

Wallach attended public schools in Los Angeles. While Meese went east to Yale, Wallach entered the University of Colorado on a debate scholarship, but left six months later when the money ran out. He got another debate scholarship to the University of Southern California and graduated in June 1955.

The two men "became close," Wallach said, as members of their law school's moot court team. "After law school, it just went on . . . . Ed is very down-to-earth. Ursula {Meese's wife} is very open. They're 'hamische.' It's a Yiddish word. It translates to homey, basic, down to earth."

The Wallachs and Meeses settled in Oakland. Their children grew up together. "We saw each other all the time," Wallach said. "We lived within a mile of each other."

Wallach wanted to practice labor law, an interest instilled by his grandfather, a socialist labor union activist who emigrated from Russia to work as a "buttonhole man" in the garment industry. When he was turned down for the job he wanted, his law school dean referred him to a top San Francisco personal injury firm, and Wallach was launched in a new direction.

Wallach left the firm in early 1970, citing personal problems, and began a solo practice from his house. "I needed . . . more time with my family," he said. Practice at home lasted only a couple of years. Wallach separated from his wife in 1972 and set up a personal injury practice in a San Francisco town house with lawyer David Baum.

Meese, by then, had been in Sacramento for six years, having joined Gov. Ronald Reagan's administration after his 1966 election. Wallach and Meese stayed close, visiting about once a month. Sometimes Meese would ask him about potential judicial candidates, but Wallach insists he was no power behind the throne.

He said he was too busy, lecturing and working for the San Francisco bar association which elected him president in 1975. He stepped down a year later with formal praise for "helping the poor, the underprivileged and those who need a friend."

It was about that time, old friends and colleagues said, that he effected a new life style, buying expensive suits, wearing a fresh yellow rose in his lapel each day, tooling about town in a vintage Jaguar, dating young women, and acquiring a striking $1,000, golden-haired Saluki dog named "Sally" that seemed to accompany him everywhere.

"Bob has always wanted to present himself as different," one San Francisco attorney who knows him well said. "Expensive thousand-dollar suits . . . hair transplants . . . . And for a while, he wouldn't go anywhere without that dog. He walked around like a model in Belgravia."

Wallach surprised acquaintances again when he sought the Democratic nomination for the U.S. Senate in 1976. He dropped out a month before the primary because of fund-raising problems. "It didn't seem as quixotic entering it as it turned out to be," Wallach says now.

Reagan's tenure as governor had ended, and Meese had moved to San Diego, working for Rohr Industries, then teaching at the University of San Diego law school. Wallach still visited when his practice took him there.

As Reagan's presidential campaign geared up, Wallach "looked forward with great enthusiasm to a Republican victory in 1980," said Manuel Glenn Abascal, a Berkeley public interest lawyer who worked with Wallach and Baum in the 1970s. "He felt he was an intimate part of what was then a very small group who were ultimately going to be running the country. I hoped it wasn't happening . . . . What he wanted was power."

In November 1980, after Reagan's election victory, the San Francisco Examiner accorded Wallach a solid place among the city's "elite, big-bucks, hot-shot superlawyers" in an article ranking him among the top five in town. "Want to have some influence in the Reagan administration?" the Examiner said. "Can't bear the thought of talking to a Republican? Then see e. robert wallach, a Democrat with ties to people in both parties, including Ed Meese."

With Meese heading Reagan's presidential transition team, Wallach was brought aboard, starting a series of trips East that grew increasingly frequent. No matter where he was, he got into the habit of sending a stream of memos to Meese on many subjects, most of which he won't discuss.

"They were written in the form of advice from one friend to another," Wallach said. "Whether they were good, intelligent or naive, I can't tell you. But they were helpful to him, I think, in performing his duties and living his life. The kind of things you wouldn't have to write if you were next-door neighbors."

Meanwhile, across country in the Bronx, Wedtech had heard about what Wallach has called "my notoriety as a friend of Ed Meese" in early 1981. The company was struggling to overcome Army resistance to its efforts to win a $32 million Army small-engine contract and hired San Francisco private investigator Harold Lipset to find out why procurement officials opposed the small firm.

"They wanted me to investigate some people that didn't like them," Lipset, Wallach's friend for 30 years, said in an interview. "I didn't think investigating the secretary of the Army and some procurement officers was going to help. I thought they needed a lobbyist in Washington and {Wallach} was the only one I knew who knew somebody in Washington."

Enlisted by Wedtech around May 1981, Wallach began mentioning Wedtech's problems in his memos to Meese. Meese has acknowledged that because of the memos, he asked his White House deputies to look into the company's problems.

In early 1982, the company also hired former White House aide Lyn Nofziger's new consulting firm. Last July, Nofziger was indicted on six counts of violating federal ethics laws. Four counts deal with Wedtech.

In May 1982, James Jenkins, Meese's top deputy, once described by former budget director David Stockman as "the White House welcome mat for special interest groups," held a White House meeting to discuss Wedtech with Army, SBA and company representatives. In September Wedtech got the contract.

Wallach, meanwhile, had caught Potomac fever, spending more time in Washington, enjoying his access to power, and demonstrating it to his friends in San Francisco. "There's no mystery about it, really," he told the Legal Times recently. "Don't you want to have breakfast at the White House?"

In the fall of 1982, Meese had Wallach named to an obscure panel, the U.S. Advisory Commission on Public Diplomacy, which meets once a month and travels abroad to evaluate U.S. Information Agency policies and programs.

By early 1983 Wallach had an apartment in Georgetown and office space at the Arnold & Porter law firm where, sources said, he kept cranking out memos to Meese, advising him on dealing with White House rivals and retaining influence with Reagan once he became attorney general.

Wallach said Jewish groups were also interested in his relationship with Meese, and he believes he became a liaison between the the Jewish community and the administration. Lipset headed the American Jewish Congress' San Francisco chapter in 1981 and New York city lawyer Howard Squadron was national president. Lipset introduced Wallach to Squadron, and Wallach introduced Squadron to Meese.

"{Jewish groups} were ecstatic," Wallach said. "Here was a liberal Jew who knew Ed Meese." Friends introduced him to then-Israeli Ambassador Moshe Arens. The late Nathan Perlmutter, national director of the Anti-Defamation League of B'nai B'rith, called Wallach "out of the blue." The day after they met in 1981, Wallach recalled, "Howard Squadron came by my office and . . . asked me whether I could set up communcations with Ed -- because the Jewish community was very concerned about the administration and felt they had no ties."

Later, as Wedtech prepared to go public with a stock offering in mid-1983, Wallach persuaded the company to hire Squadron's law firm as corporate counsel -- with an arrangement that Wallach would receive 10 percent of all fees Wedtech paid Squadron's firm.

"Howard took them on for some reason," Wallach said. "He ended up with $3 to $4 million in fees, but at the time he wasn't sure they would get paid."

Around then, Wallach, Nofziger and others were pledged blocks of Wedtech stock. "They gave us a percentage of it so we could all share in the American dream. I thought it was wonderful," Wallach said.

Wallach sold his stock two years later for about $630,000. He has said he received about $360,000 in legal fees from Wedtech and, according to a lawsuit filed against him by Wedtech's new management, he also got a $300,000 consulting fee for which he allegedly performed "no services."

Wallach rejects suggestions that any of the compensation was for his help in getting the 1982 Army-SBA contract. "I met Wedtech in 1981," he said. "I had no professional relationship until late 1982. I did not receive a dime from them until 1983."

In early 1984, Wallach moved to Dickstein, Shapiro & Morin, where he worked with Garment on the probe that was holding up Meese's confirmation as attorney general.

In San Francisco, meanwhile, Wallach had befriended two men who are now also subjects of the Wedtech investigation. One was his San Francisco landlord, R. Kent London, a nonpracticing pediatrician, former water-bed company executive, and professional blackjack player. The other was W. Franklyn Chinn, a San Francisco financial whiz who was a frequent business partner of London.

Wallach brought the two men East in the spring of 1985 and they were hired as Wedtech consultants. Chinn became a Wedtech director that August.

Earlier, Wallach had entered an investment partnership with Chinn and, according to his government financial disclosure reports, soon was making $100,000 to $200,000 a year in interest and capital gains.

Wallach urged Meese, by now the attorney general, to enter a "limited blind partnership" with Chinn. Meese and his wife did so on May 23, 1985, less than a month after Chinn had become a Wedtech consultant.

Both London and Chinn are now being sued by Wedtech's new management for allegedly defrauding the company of more than $1.4 million in consulting fees. The new management also charged that the fees were improperly shared with Wallach. Wallach said Chinn and London have previously retained him for legal work, but he insisted he was not paid with Wedtech money.

Wallach has put his Washington condominium up for sale and is spending most of his time in San Francisco, where he meets Chinn about once a week for cappucino at North Beach coffee houses. Recently, he resigned from the post he was proudest of: U.S. representative to the United Nations Human Rights Commission.

Acquaintances in San Francisco said that during his travels to the East, Wallach virtually abandoned his once-thriving law practice. He depends almost entirely on referrals from other lawyers, and he has told friends the phone isn't ringing these days.

The San Francisco Examiner, which once praised Wallach so lavishly, recently ran a front page story about him and Baum under the headline "Malpractice Suit Says S.F. Lawyers Cheated Little Girls." It involved an out-of-court settlement in which two young burn victims received annuities costing $730,000 while Wallach and Baum negotiated a $1 million legal fee for themselves.

One friend, who said Wallach "speaks in despairing terms in recent months," said he recently advised him during a long hand-holding session to take the pressure more stoically, like his friend Meese would.

With Meese under investigation, Wallach said he hasn't seen his old friend since April, "because of appearances," or even sent any memos.

"It is very painful," Wallach said. If it were not for Wedtech, he said, he would have been at Meese's side helping him prepare his testimony for the Iran-contra hearings. "I would have been at his house, or having sherry with him at his office," Wallach said in wistful tones.

He said he now regrets ever having urged Meese to leave San Diego and go to Washington with the Reagan administration. "Ed agonized over whether to go to Washington," Wallach said. "He loved San Diego . . . . I regret to this day whatever role I played in encouraging him to continue his activities."

Staff researcher Michelle Hall contributed to this report.