The District of Columbia's controversial new 6 percent gasoline sales tax took effect at midnight last night after a D.C. Superior Court judge ruled that imposition of the tax would not violate federal pricing regulations.

Judge William E. Stewart had delayed imposition of the tax -- about 8 cents a gallon at current prices -- for four days after lawyers for the Greater Washington-Maryland Service-Station Association claimed that gasoline dealers who collect the tax might be subject to prosecution for exceeding federal gasoline price ceilings.

However, Stewart said that after reading a three-page Department of Energy letter on the issue, he was satisfied that "it is clear . . . the imposition of this tax . . . would not be a prosecutable offense."

The gasoline tax is expected to provide $2.3 million of the $20.3 million in new taxes that the city expects to collect by Sept. 30. The District started collecting other taxes in the package last Friday as part of an effort to solve the city's current financial crisis.

The gasoline tax proved to be the most controversial segment of the revenue package, as service station operators voiced the fear that D.C. motorists would drive to the Maryland suburbs, which now has the cheapest gas prices in the Washington area.

Gasoline prices recently went up in Northern Virginia with the imposition of new taxes amounting to about 5 cents a gallon.

The remainder of the D.C. taxing package also has run into some snags. Numerous grocery and candy store owners have complained that they were not notified of the new 8 percent tax on candies, confections and soft drinks or not provided with guidelines telling them exactly what items are to be taxed.

"I can't really tell you that things are better today than yesterday," Ed Meyers, deputy director of the city's department of Finance and Revenue, said of the colection efforts. "But over time people will become accustomed to the new tax. It will take time."

Lawyers representing the Greater Washington-Maryland Service Station Association claimed that the Energy Department information on the federal pricing regulations had not answered all the necessary questions and vowed to return to court again to challenge the tax. But they did not immediately appeal Stewart's ruling.

Finance and Revenue chief Carolyn L. Smith said that gasoline dealers were notified yesterday that the tax would take effect at 12:01 a.m. today.

The dispute centered on an energy department rule issued last June that gasoline station operators could not charge more than 16.8 cents per gallon over their wholesale costs. In implementing the new gasoline tax, the city government told service station dealers they could add a flat 8 cents tax per gallon, rather than figuring the 6 percent tax on each sale.

However, that result in gas dealers sending less money to the city than they collect, according to Malcolm W. Houston, the attorney for the service station operators. If the difference exceeds the federal government's price ceiling, Houston said, the gas station owner might be subject to a fine. p

At yesterday's hearing, however, representatives from the D.C. Corporation Counsel's office displayed the three-page Energy Department letter stating that retail gasoline dealers could add the gasoline sales tax to "otherwise maximum allowable selling prices" for gasoline. The Energy Department letter said the dealers would not be exceeding the allowable 16.8-cent-a-gallon margin over the dealers' wholesale costs.

Assistant D.C. Corporation Counsel Richard Amato called the Energy Department's letter "a clear mandate for the District to impose its tax."

Stewart agreed lifted his temporary restraining order blocking imposition of the tax.

Predictably, several gas station operators who attented the hearing were not pleased with the ruling.

Bill Brooks, owner of Bill's Gulf and head of a local service station dealers association, said the tax would cause operators headaches "because it's going to drive away what little business we have."