A U.S. District Court judge ruled yesterday that Exxon Corp. has a right to examine internal documents of the Department of Energy to prepare its defense against government allegations that it overcharged customers $183 million in crude oil sales.

Judge Thomas A. Flannery rejected the government's argument that only memoranda and publications of official DOE policy should be accesible to Exxon. Instead, Flannery accepted the oil producer's contention that it needs access to draft documents of final enforcement statements, including opinions of lower-level agency officials, law enforcement files and correspondence which would relate to the question of whether Exxon had violated DOE regulations.

His decision could affect the efforts of other oil companies to defend themselves against similar suits by DOE.

Flannery noted, however, that some of the documents sought by Exxon ultimately may have to be withheld anyway based on laws that restrict disclosure of "privileged" documents, such as working papers drawn up before decisions are made, interagency memoranda and correspondence between attorney and client.

DOE charged last June that Exxon, the world's largest petroleum producer, had overcharged its customers $183 million between 1973 and 1976. Essentially, DOE contended that Exxon was producing oil that should have been classified as "old" oil and was selling it at a higher price as "new" oil. Those two classes of domestically produced crude oil were created in 1973 by regulations designed to give domestic producers an incentive to produce more oil. DOE claims Exxon violated those regulations.

Exxon has contended, however, that the 1973 regulations were ambiguous and were not clarified until 1976, when Exxon says it changed its production activities. Exxon claims that even DOE employes interpreted the regulations in the same way as Exxon, and it wants access to internal DOE records to prove that point in court.

Flannery, noting that his decision applies to cases such as Exxon's where DOE attempted to enforce new regulations retrospectively, said that DOE information about its employes' interpretations of the old regulations would be helpful to the court, as well, in resolving the case.

"Blinded deference to official agency interpretation is unwarranted when the DOE attempts to enforce retrospectively new regulations that clarify a situation unaddressed by the prior regulatory scheme," Flannery said.

In those kinds of situations, Flannery said, information on how the agency itself interepreted the old rules "enables the court to determine whether those responsible for the enforcement of the original regulations found them ambiguous."

Moreover, Flannery said, such information could "also reveal whether DOE employes intepreted the regulations in varying manners, perhaps even in sanctioning the industry conduct."

Flannery added that it would not be proper to evaluate the industry's conduct without "looking to agency employe opinions as to the intent and meaning of the applicable regulations."

In a 32-page decision, Flannery also said that DOE will have to search audit files throughout its crude producer audit division, which oversees the oil companies' compliance with DOE's crude oil pricing regulations. Flannery said that information in those files "could be the most relevant available to Exxon."

DOE had argued that files in its branch and site offices of that division were maintained by auditors and other personnel whose statements are not binding on the agency. The audit files in those offices contain information on the to 34 crude oil producers, including Exxon.

Those files, Flannery said, could reveal DOE compliance policies toward Exxon competitors and could show whether DOE treated Exxon the same way they treated other oil companies.

In a footnote, Flannery noted that his opinion in the case related only to instances in which DOE accuses industry of wrongdoing. Flannery said he is taking no positon on access to information where an oil company has initiated action.