A federal judge authorized the release today of secret oil company information showing that Maryland, Virginia and the District of Columbia received far less gasoline proportionately than most other states in the nation.

The District received only 84 percent as much gasoline in June of 1979 as it did during the same month last year, according to reports compiled from data supplied to the government by the oil companies. Maryland and Virginia received only about 85 percent as much gasoline last month as they did in June 1978, according to the document filed in court today.

Maryland Attorney General Stephen Sachs presented the figures as evidence in Maryland's lawsuit against the federal government's emergency allocation program. Maryland contends that it is receiving less than its fair share of gasoline under the program.

Attorneys representing the Department of Energy, a defendant in the suit, strenously objected to public release of the figures.

Energy Department allocations chief Alan Lockard, interviewed in Washington, accused Maryland officials of manipulating the figures to prove the argument they are making in the lawsuit to obtain more gasoline for the state.

The figures, presented in U.S. District Court today, showed that Maryland got 25 million fewer gallons of gasoline last month than in June 1978. The drop in Virginia represented a 36-million-gallon decrease for that state.

For Northern Virginians, the problem may be compounded by actions of state energy officials who have been allocating gasoline in a pattern that has favored Richmond and some rural areas over the populous Washington suburbs, according to state energy office figures.

Only eight states - Connecticut, Delaware, Pennsylvania, Mississippi, Minnesota, Iowa, Wyoming and Alaska - fared as badly or worse than the District, Maryland and Virginia, according to the figures disclosed in court here yesterday.

Two states - New Hampshire and Hawaii - received more gasoline this June than last, according to the figures.

Sachs charged that the federal government emergency allocation system - in effect since May 1 when the shortage began spreading across the country - allowed some states, such as those in the Sunbelt, to receive far more than their "equitable share."

The June figures presented by Sachs were compiled from oil industry reports filed in late May comparing actual gasoline deliveries state by state in June 1978, with "anticipated" deliveries in June 1979. The confidential reports are made monthly to the Energy Department and were turned over to Maryland officials under a court-ordered agreement that the data would not be made public.

But today, after a 45-minute private conference between Sachs and attorneys for the federal government, U.S. District Court Judge Herbert Murray allowed public release of the data, despite the federal government's objections.

The Energy Department compiled a similar set of figures from oil industry data earlier this year comparing May 1978 deliveries with projections for May 1979, and sent them to President Carter in a report on the California gasoline shortage. The figures showed that Maryland was expected to receive 91 percent of its May 1978 deliveries in June of this year.

But, in an affidavit filed in defense of the federal government's allocation system, a top Energy Department official contradicted that figure - asserting that other data would show that Maryland's actual gasoline deliveries were 96 percent of the May 1978 amounts. However, the government has not yet introduced documents supporting this figure in the trial that will continue Friday.

In the affidavit, Doris J. Dewton argued that "Maryland is not bearing a disproportionate share of the nationwide shortage of motor gasoline supplies, as compared with other states and regions of the country." In fact, Dewton said that Maryland was receiving an amount "which appears to be above the national average," according to the court document.

Justice Department attorney David J. Anderson, who is representing the Energy Department in the lawsuit, refused to discuss the discrepancy between the figures quoted by Dewton and those on the department report cited by Sachs. Anderson said that would be discussed Friday.

The federal government also argued in doucuments filed with the court that there is always a discrepancy between actual delivery figures and the projected figures reported by the oil industry. But the actual May 1979 figures will not be available until next week, and the June figures will be unavailable until early August.

In his opening statement in court, Sachs asserted that the situation in Maryland is even worse than the oil industry projections would indicate. He charged that the projections run higher than the actual deliveries to the state.

Sachs also argued that a top Energy Department official conceded that the volume of gasoline actually brought into any state depends on "the luck of the draw", not upon an equitable allocation system. The system works like a "crap shoot," Sachs quoted another official as saying.

"That, Your Honor, is not regulation," Sachs argued to Judge Murray. The lawsuit - the first of its kind against the Energy Department this year - charges that the department ignored its congressional mandate to provide for an equitable distribution of gasoline. Maryland is asking the court to direct the department to send the state the same percentage of the nation's gasoline supplies that it received in the corresponding month last year.

Sachs has argued that the federal allocation program fails in parts because it does not take into account the fact that every state is dependent on different gasoline suppliers, all of whom have established different nationwide allocation plans.

In Maryland, for example, roughly 20 percent of the gasoline is supplied by Exxon, which now has a national policy of providing states with about 78 percent of the gasoline they received at the same time last year. That percentage is lower than the figures set by several other oil companies.

Because Maryland is so dependent for it gasoline supplies on Exxon - its major supplier - the impact of the 78 percent quota hit the state harder than many others, Sachs has argued.

The federal regulations "are fine when there's a time of plenty, but when there's a time of plenty we don't need them," Sachs said in court.

A second flaw in the federal allocation program, according to Maryland's lawsuit, is that the regulations allowed for additional gasoline allocations to regions that can show more than a 10 percent growth in gasoline purchases between October 1978 and February 1979. But it was during the same months that gasoline use was reduced in states like Maryland because of an extraordinarily severe winter. So that adjustment benefits the Sun Belt regions at the expense of other sections of the country, Sachs argued.

However, Anderson argued for the Energy Department that the regulatory system does not demand the "mathematical equality the state of Maryland is talking about."

He argued that Maryland Gov. Harry Hughes failed to make a number of moves that could have "alleviated shortages in several areas" of the state.

The federal government argued that although the Energy Department increased the level of "state setaside" programs in June to allow states to redirect more gasoline into areas experiencing severe shortages, Maryland failed to take advantage of the increase. CAPTION: Map, Gas Allocation Ratio for June, By Richard Furno - The Washington Post