Doing so wouldn’t unfairly strip the law of adequate defense: if the administration took a stand against the law, the appellate courts would very likely allow lawyers for Congress or outside groups to appear and argue on its behalf.

This approach is not unprecedented. In 1943, Congress passed a law prohibiting the payment of salaries to three particular government employees. Arguing that the law was unconstitutional, the employees sued and won in claims court. The solicitor general asked the Supreme Court to review the lower court’s decision, but he also told the justices that the administration agreed with the original ruling; the court ultimately struck down the law.

That case and others like it provided a precedent for President Bill Clinton in 1996 both to comply with a law requiring the military to discharge service members who had H.I.V., and at the same time inform the courts that he found it to be unconstitutional. Thanks in part to support from the military, Congress repealed the law before litigation ensued.

Telling the courts that a federal law should be struck down is not a position to be taken lightly by a president wary of overstepping his bounds. But if he concludes that the law restricts important liberties without advancing a government purpose, he has the right to say so. After all, while courts usually defer to Congress on such questions, the president is under no such obligation: he is a constitutional officer entitled to his own views on governmental necessity, particularly on matters of national defense.

True, having the administration argue that the law is unconstitutional wouldn’t guarantee that the Supreme Court would strike it down: in 1990, for example, the Supreme Court upheld a federal minority preference program even though the acting solicitor general (and future Supreme Court chief justice), John G. Roberts Jr., argued it was unconstitutional.

But the president could increase the chances that the appellate courts would agree with him by following a deliberate process that gives consideration to the views of the military leadership, some of whom have already come out against the policy. The courts would be more likely to defer to such a clear, unified position.

Since 1993 more than 13,000 men and women have been unfairly discharged from the military, people who could have been of service in America’s overseas conflicts. The best path to ending “don’t ask, don’t tell” is for Congress to repeal the law as soon as possible. If it doesn’t, President Obama should give the Supreme Court his administration’s honest view: that the law is harmful to national security.