An Exxon station in Foggy Bottom in 2013. (MANDEL NGAN/Agence France-Presse via Getty Images)

EXACTLY HOW many gas stations should the District have within its 68 square miles? How many should be “full service,” with repair shops, and how many just “gas-and-go”? We don’t know. You don’t know. The D.C. Council, however, does know.

The council has prohibited the sale of property containing a gas station for “any other use,” or even the conversion of a full-service operation to a gas-and-go — without prior approval from something called the Gas Station Advisory Board. Under the law, enacted to little fanfare last fall, the only exception is “extreme financial hardship,” as the D.C. government defines it. Also, there must be an “equivalent” station a mile or less away to take the departing one’s place.

So now you can use marijuana legally in the District, but you have to ask permission to sell land with a gas station on it. No doubt the franchisees who lease and operate stations are glad lawmakers protected them against their landlords. The public’s stake in that intra-business tug of war is less clear, however.

The law’s goal is “to preserve as many full service stations as possible” for D.C.’s neighborhoods, according to an accompanying committee report. This fine sentiment was based on no market analysis, except to note that there were “as few as” 108 service stations in the District as of 2006, of which 47 were full service.

Those figures do indeed represent a decline over the previous quarter-century — not surprising, given that the District’s population and car registrations also fell, while auto-service chains such as Midas and Jiffy Lube emerged. The District has fewer corner bakeries and groceries than it used to, too. And don’t get us started about newsstands.

Ironically, the council acted in response to then-Mayor Vincent C. Gray’s (D) request to abolish the Gas Station Advisory Board; it seems that mayors had consistently allowed stations to close or convert even when the board said otherwise, rendering it superfluous. No one had even been appointed to the board since 2006. But council Chairman Phil Mendelson (D) felt the solution was to strengthen the board, and he introduced a measure to make it impossible for a mayor to permit a station’s sale or conversion over the board’s contrary recommendation.

In November, Mr. Gray signed the bill, which was included in a broader measure that he supported; but he called it an unenforceable infringement on constitutional property rights. He then left office, so it is up to his successor, Mayor Muriel E. Bowser (D) to decide what to do.

Together with a separate 5 percent tax on real estate transfers that applies only to gas-station properties, the new law creates a powerful web of restrictions on property rights for no clear public purpose.

Supply and demand should decide such matters, subject to generally applicable land-use regulations such as historic preservation or zoning. And the law is probably counterproductive in any case: Who would build a new station, knowing that it would fall under the Gas Station Advisory Board’s ultimate control and be subject to extra taxation as well? If Ms. Bowser wants to show that her young administration can improve the District’s business climate, calling for the repeal of these silly laws would be a good place to start.