When the government sued nine major oil companies last month for allegedly overcharging consumers by more than $1 billion -- in violation of complex federal pricing regulations -- the story made the front pages of newspapers around the country.

But one month earlier, when 15 oil companies won a major court battle defeating the government's attempt to charge them $1.3 billion in similar alleged overcharges, there were no page one stories.

In an advertisement appearing in several major newspapers a few days after last month's government action, Mobil Corp. asked, "When we win this time, will there be huge headlines proclaiming that the oil companies are the good guys? Frankly, we aren't holding our breath."

In a speech last September, Mobil's vice president for public relations, Herb Schmertz, said "some popular journalists, members of the academic community and various self-anointed defenders of the public interest, whatever that is, have cast big business in the role of bad guys."

Schmertz claimed that "some people -- those who consider business bad -- are making a concerted effort to stifle free expression by corporations."

Schmertz' remarks were designed as a defense of the elaborate advertising campaign he has undertaken for Mobil. Mobil spends more than $20 million a year on advertising and promotion, including hunderds of quarter-page advertisements in the most prestigious newspapers in the country -- many placed in premium-priced positions opposite editorial pages.

Mobil has seen fit to take those ads -- which generally present the company's opinion on a specific energy issue -- because, as Schmertz says, Mobil and its fellow oil companies have "found themselves the targets of various accusations based on myths."

The oil industry has become particularly irked with one recent government effort. In December 1977, the Department of Energy set up the Office of Special Counsel (OSC), a highly touted strike force of more than 500 accountants and lawyers, to go after possible violations of the complex set of pricing regulations imposed upon the oil industry after the 1973 Arab oil embargo.

DOE did not hide the fact that this new team was designed to make up for past enforcement failures. In fact, the OSC was set up in response to the report of a special task force, headed by Securities and Exchange Commission enforcement chief Stanley Sporkin, which called previous DOE (then known as the Federal Energy Administration) enforcement efforts a disaster.

The Sporkin report called FEA's efforts to secure oil industry compliance to the complicated pricing regulations "a failure." The report recommended creating the Office of Special Counsel to deal specifically with pricing regulations compliance.

On Dec. 13, 1977, only nine days after he was put in charge of the new Office of Special Counsel, Paul Bloom subpenaed financial records of all 34 major refiners. "And we began to intensify our audits of the 15 largest companies," he said.

A hard-driving prosecutor, Bloom not surprisingly quickly earned the animosity of the oil industry. He is committed by statute to complete all of his audits and initiate all necessary enforcement actions by the end 1979. It is a tough schedule demanding results in an area that has not produced any results for a long time.

So Bloom has taken great pains to see that when he does act, it is duly noted. He frequently briefs reporters in detail about an action his office has taken. And he has had much to brief about. His office has filed dozens of action, both administratively and in the courts, aimed at getting several oil companies to refund an estimated $2.2 billion (so far) worth of what his office alleges are "overcharges" by oil companies he said cheated on the regulations.

Last Thursday, the government scored its first undisputed victory in that probe. Kerr-McGee Corp., while admitting no wrongdoing, signed a consent decree agreeing to refund some $52.6 million to gasoline and home-heating-oil customers the DOE felt has been overcharged because of the way Kerr-McGee had interpreted the federal pricing regulations. The DOE had alleged that Kerr-MeGee overcharged by $80 million, but the settlement was seen as a clear victory.

The Kerr-McGee decree may have been an important battle, but the war is far from over.

The industry has considerable support in Congress for its contention that the regulations under which Bloom and the DOE are suing are, for the most part, complex and ambiguous.

"We have found that in some cases, the interpretation of the regulations is so uncertain that even federal officials disagree on what they mean." Exxon Senior Vice President O.L. Luper said in a recent speech. In some major areas of uncertainty, there are months -- even years -- of delay before definitive answers are forthcoming, and sometimes not at all. On one major issue, the DOE claimed an overcharge during 1973 and 1974 when the regulation wasn't made effective until January 1975."

Luper and many other oil executives contend that, when they did ask the FEA for interpreations of the regulations in question, they were led to believe they were doing things correctly. It was not until years later that they were told they were wrong, and then asked to pay back money they had collected.

"Aside from the fact that a number of companies believe DOE's contentions are flatly wrong, there is also concern for the manner in which essentially interpretive differences are resolved -- or not resolved," Luper said.

The courts have agreed with the oil companies in at least two cases. The Temporary Emergency Court of Appeals -- a federal court set up to hear final appeals of all court cases stemming from government price-control regulations -- late last year ruled that the government indeed had botched its attempts at oil regulation and unfairly tried to reinterpret old rules.

That decision came after lower courts in Ohio and Delaware had ruled that the government was wrong in 1975-76 in attempting to force 15 oil companies to refund $1.3 billion to their customers in a dipute over pricing regulations.

In that case, as in many of the more recent cases filed by the government, the issue involved what cost increases the companies were allowed to pass on to consumers while oil price controls were in effect. The complex rules designating costs that could not be passed on were called "remarkably inept and self-contradictory" bt U.S. District Court Judge John Manos in Cleveland.

Manos said that there was "confusion and uncertainty among both FEA officials and reginers" about the regulations in question and that "refiners informed high-level FEA officials" as to the manner in which they were applying the regulatons.

While that court decision does not have any direct bearing on the other cases, it does support what long has been the contention of the oil industy: that there was considerable confusion over the issues, and that the industry sought -- but did not receive -- proper guidance from government regulators. who then is to blame if there were overcharges? the industry asks. Is the industry wrong for taking the most profitable course available under the circumstances?