The U.S. Department of Energy has ruled that in future gasoline crunches here, supplies would be shifted to Washington from other parts of the nation.

The ruling came after the department concluded that Washington motorists were treated "unfairly" in last summer's gasoline crisis. The department found that District of Columbia gasoline stations received 88 percent of their normal supplies in June and 83 percent in July, while the national averages for those two months were 95 and 92 percent of normal levels.

DOE also determined that stations for the whole metropolitan area received only 85.3 percent of normal June supplies -- well under the national level and less than that received by five of six metropolitan areas that the Energy department used for comparison.

The department conceded that the federal government's cumbersome gasoline allocation rules were largely responsible for the District's plight.

"The residents of the District experienced a gross inequity and an unfair distribution of burdens during the months of June and July," said the ruling, issued late Wednesday.

In response to a formal petition from D.C. Mayor Marion Barry, the department set up a "trigger mechanism" under which it will quickly order oil companies to channel extra supplies to the District -- and probably to shortchanged states -- if it appears that they are being unfarily shorted.

To activate the trigger, the District must prove that it is receiving at least 5 percent less gasoline than the national average, and that it meets criteria for gasoline lines and restricted service station hours -- all facts that it easily proved to DOE about the situation last June and July. In addition, the District must have an odd-even gasoline rationing plan in effect.

If the mechanism had been in effect last summer, the District would have received 7 percent more gasoline in June and 9 percent more in July -- months when there were long gasoline lines here but not in most of the rest of the nation.

The Energy Department's ruling noted that the District's current gasoline supplies are about 7 to 8 percent below normal levels -- the same as those in the rest of the nation. Thus, the trigger would not be used this month.

D.C. energy chief Chuck Clinton said yesterday that the ruling would prove a "great benefit" to District motorists if there is another serious shortage of gasoline. But, he added, the ruling "is not the answer to all our problems."

Under Clinton, a Barry appointee, the city's energy office has been vastly expanded, mainly with federal funds. Clinton said that the District's petition to DOE's office of hearings and appeals required the work of several staff members.

The mayor said yesterday, "I'm glad we were seccessful. It's another example of forward progress."

While the new ruling is specifically limited to the District's case, it appears that shortchanged states may be able to take advantage of the new trigger mechanism by submitting their own applications to the Energy Department.

According to statistics released with the ruling, 15 states received at least 5 percent less gasoline than the national average last June.

As with several earlier adjustments to the government's crazy-quilt allocation system, oil industry analysts said yesterday that the new ruling might have unpredictable results -- such as new shortages in other places.

"From whence does the [extra gas for the District] come?" asked a spokesman for Amoco, which controls 26 percent of the gasoline market here. "Whom do you take it away from? I can see all kinds of problems from [the new ruling]."

An Energy Department spokesman said that Washington's extra gasoline would come from the general national supply, lowering everybody else's supplies just a little bit.

But if 16 or more states should apply for extra gasoline in a crisis, no one knows for sure what the result would be.

Mark Emond, editor of the gasoline marketing publication, the Lundberg Letter, said that the District has relatively low gasoline consumption, so that a shortfall could be made up with only a small amount of everyone else's gas.

But he said that if a big state successfully applied for extra gasoline, it "could suck one hell of a lot of gas" from other states.

The Energy Department ruling says that the District can get extra gasoline in any given month by proving that:

Its supply forecast, based on DOE statistics, is at least 5 percent less than the national average, or that the weighted average of major oil company delivery projections for the District for the month are at least 3 percent below the national average.

At least half its service stations had gas lines of eight cars or more at least once on three days of a recent four-day sample period.

At least half its stations sold gasoline for no more than 5 1/2 hours a day during a similar sample period.

In its application, the District provided statistic showing that all these conditions existed last June and July. The Energy Department accepted these statistics as proof. This "self-certification" method is to be used in the future if the District applies for extra gasoline under the new trigger mechanism.

The District must also have an odd-even gasoline rationing plan in effect, have "attempted without success" to obtain extra gasoline supplies from oil companies directly, and have "rationally distributed" its "setaside" gasoline -- the 5 percent of each month's supply to a state that can be distributed at the discretion of the state government.

One of the District's arguments to DOE was that because of its unique city-state situation it could not get setaside gasoline from rural areas.

Such movements of gasoline in Maryland and Virginia helped ease the long lines in those states' most populous areas. Before the two states began using their setaside authority vigorously, it appeared that the allocation system was channeling unneeded quantities of gasoline into the countryside and away from urban areas where it was needed more.

The odd-even rationing system was imposed here June 21 and was credited with finally ending the lines. The system was lifted Sept. 30.