TWO MONTHS ago, Mayor Vincent Gray proposed common-sense legislation that would allow an estimated 15,000 illegal immigrants living in the District to obtain D.C. driver’s licenses. Now a committee of the City Council, employing supremely muddled thinking, has modified the mayor’s proposal in a way that would blatantly violate federal law, cast a pall on the validity of all D.C. licenses and do no favors for undocumented immigrants.

How does the council’s move make sense?

The mayor’s proposal would grant licenses to immigrants living in the District if they showed proof of identity and residence. In that way the city could ensure that whatever their immigration status, drivers are competent, safe and insured. Mr. Gray’s bill made clear that the licenses for undocumented immigrants would be distinct from other city-issued licenses, so they could not be used for boarding flights or accessing federal programs.

The latter provision, also found in similar legislation enacted in seven states and pending in others, complies with federal law. The law, known as REAL ID, requires states and localities to verify the lawful status of applicants for driver’s licenses and identification cards.

However, the council’s Transportation and Environment Committee, in a unanimous vote, decided that federal law shouldn’t apply to the District — even though it acknowledged in a report that “factually” it does, indeed, apply.

For the committee and its chairman, Council member Mary M. Cheh (D-Ward 3), these facts are inconvenient. They say that the federal law can be safely ignored because they dislike it.

Their arguments rest on the flimsy foundation that REAL ID is unpopular and controversial, that the feds haven’t fully enforced it and that it would be expensive to implement. More to the point, they believe that requiring markers on licenses for illegal immigrants would stigmatize them and discourage their widespread use.

That’s possible. In most of the states that have decided to provide such licenses, marked to make clear they are invalid as federal IDs, no data on demand are available yet.

But as the committee report acknowledges, undocumented immigrants could use such licenses without worries in the District, where law enforcement does not target illegal immigrants. While drivers bearing such licenses might be at risk elsewhere, specifically Virginia, the risk would surely be no greater than from driving without a license, which is their only option now.

Some council members believe a distinctly marked license of the sort Mr. Gray proposed would confer second-class status. In fact, undocumented immigrants already are fully aware of the limitations imposed by their status. A driver’s license, whatever its design, does not change that; it simply ensures that those who possess it have met minimum qualifications to drive safely.

Two states, New Mexico and Washington, have gone the route Ms. Cheh’s committee recommends and now issue illegal immigrants licenses identical to those given to legal residents. The risk for those states, as for the District if it follows suit, is that the federal government would refuse to accept any driver’s licenses from those states as valid ID, including to board airplanes.

Ms. Cheh says glibly that if the Department of Homeland Security starts enforcing the law, “we can worry about that when the time comes.” That’s a shaky basis for legislation. Better to do the obvious thing and obey federal law.