Bureaucratic infighting between lawyers for the Department of Energy and the Justice Department's civil division threatened the government's legal position on billion-dollar over-charging cases against the major oil companies, according to documents from a Senate hearing yesterday.

In March 1979, then-associate attorney general Michael J. Egan wrote to DOE general counsel Lynn Coleman to complain about a lack of cooperation in preparing the cases which involved $1.7 billion in alleged overcharges against seven firms. He said Energy Department lawyers refused to forward redrafts of proposed complaints to Justice, and canceled scheduled meetings with auditors.

This failure to cooperate "has already damaged the government's interest in this litigation," Egan wrote.

Barbara Babcock, former assistant attorney general in charge of the civil division, testified at the hearing that DOE first referred the cases to Justice, but then changed course and acted administratively, apparently so its own lawyers could handle the cases.

Paul Bloom, DOE's special counsel, who brought the massive overcharging cases, said yesterday that it was "regrettable to have internal government memoranda released like this . . . It's sad to waste government time and energy in internecine disputes over border lines."

He said DOE decided to handle the overcharging cases administratively after Egan said Justice would take primary responsibility for the cases. This would have left experienced DOE attorneys to train the Justice lawyers and delayed the cases for months, Bloom said.

"On several occasions we've found them [Justice attorneys] defensive and territorial and pedantic," he added. "We're taking on $200,000-a-year lawyers [defending the oil companies] in these eases. It's a pity to sacrifice resources on such a silly subject as this fight."

Babcock called the memo "a nightmare" yesterday, and said that she had written a memo to Egan in February 1979 suggesting that it be rescinded. Last August, a deputy, Thomas S. Martin, in a letter to Egan describing discussions with client agencies about litigating authority, noted the "dismal history" of litigation under the memo and reminded him of the recommendation to scrap it.

Daniel said yesterday that her staff still wanted to end the agreement, and described the client relationship with Energy as the worst her division faces.

Eric Fygi, deputy general counsel at DOE, said yesterday that the issue raised in the hearing was "either a theological expedition butressed by ancient history or new problems we haven't been informed of."

Babcock, Alice Daniel, who succeeded Babcook in her job, and Rex E. Lee, who preceded Babcock in her job, all made strong statements for the position that Justice should handle all of the government's court work.

Babcock argued that agency lawyers have too narrow an interest to represent in court, while Justice attorneys are obliged to think of the best interests of the whole government and the public, as well as the agencies.

She went on to note, however, that the civil division's ability to carry out that role has been hampered for years by a lack of manpower. "As a result we're not always able to deliver what we advertise -- that is sophisticated litigating skill."

Lee agreed with her that the division needs more lawyers and more support from paralegals and computers. Both said they had argued for more resources, but Lee called arguing with the Office of Management and Budget "like talking with the wall."