IT TAKES a special genius in politics to be assailed by both sides of an argument and receive no credit at all for standing in the middle. That is the position into which Barack Obama appears needlessly to have manoeuvred himself on gay rights. Social conservatives complain that he has done too little to “defend marriage” (by which they mean preventing gays from marrying), and that his plan to allow gays to serve openly in the military will spook America's warriors. Gay activists complain that he has so far been too timid on both fronts. And, as luck would have it, Virginia Phillips, a federal judge in California, made a ruling this week that has tossed the question of gay rights back into the public eye at the most uncomfortable possible moment for the White House: three weeks before November's mid-term elections.

The legal side of this story is simple. Under the policy of “don't ask, don't tell”, gays in the armed forces are prohibited from disclosing their sexual orientation. If they do, or if they are found out, they are discharged. Since 1993 over 13,000 have been thrown out when their homosexuality became known. A group of gay activists, the Log Cabin Republicans, complained that this infringed their constitutional rights and took the Department of Defence to court. Last month Judge Phillips found for the plaintiffs, ruling that the policy violated their free-speech and due-process rights. On October 12th she followed up by ordering an immediate stop to all investigations now under way and a halt to all planned discharges. In effect, unless a higher court takes a different view, the Clinton-era compromise that has governed the service of gays in the military for a decade and a half is dead.

The politics are a bit more complicated. Mr Obama is in favour of ending the ban on gays serving openly. In his state-of-the-union speech last January he promised to repeal the law that denies gay Americans “the right to serve the country they love because of who they are.” It was, he said, “the right thing to do”. You might therefore expect the president to welcome Judge Phillips's injunction. If the federal government chooses not to appeal, her finding will stand and the offending policy will be consigned to history. There are, however, two difficulties. One is that, by convention, the Department of Justice is expected to appeal decisions that strike down existing law. The other is that, like Macbeth, what the president wants highly he also wants holily. The administration has so far taken the high-minded view that if repealing the law is indeed the right thing to do, it should be done by the lawmakers themselves in Congress, not by the courts.

But when? Gay activists are already disappointed that Mr Obama has not repealed the Defence of Marriage Act, which defines marriage as a union between one man and one woman, even though he says he wants to. And much as they welcome his promise to repeal “don't ask, don't tell”, they are dismayed by the stately pace and bungled tactics of his attempts to do so. Instead of moving when the Democrats' majorities in the House and Senate were still secure, Mr Obama insisted on a long period of consultation with the armed forces, which were asked to conduct a survey on how servicemen felt about (though not whether they approved of) the impending change. The House voted for repeal in May, but the Senate dawdled. Then, last month, before the survey was finished and for reasons still unclear, the Democrats abruptly tried to attach a repeal of the law to the defence appropriations bill, a stratagem the Republicans defeated in a filibuster.

All this leaves Mr Obama's policy in a mess. The Department of Justice has already appealed the ruling of a judge in Massachusetts that found the Defence of Marriage Act to be unconstitutional. If it now appeals Judge Phillips's ruling as well, the administration will find itself in the peculiar position of going to court to defend two laws that are deeply unpopular with Mr Obama's own most liberal supporters, both of which it claims to oppose. Barney Frank, one of three openly gay members of Congress, is advising the administration to get out of this pickle by delaying its decision on whether to challenge Judge Phillips's ruling until the mid-terms are over, so that Congress can repeal the law in a lame-duck session afterwards. But there is no guarantee that the Senate Republicans will not choose to block the move again.

One of the oddities of this saga is that most Americans—67%, according to the latest CNN poll—agree with Mr Obama that it is right to let gays serve openly in the military. Popular support for gay marriage is weaker, which suggests that Mr Obama's careful middle way (he supports civil unions but not marriage for gays) may also be close to majority opinion. In an election season dominated by economics, the culture wars have not had a high profile. Carl Paladino, the Republican candidate in New York's governor's race, was forced to retreat swiftly this week after saying that children should not be “brainwashed” into thinking being gay was “a valid or successful option”. In short, the public mood is not one that should have made Mr Obama's position on gay rights a political embarrassment to him.

Learning too well from Clinton

That it now is cannot be blamed only on him. The president had no control over the timing of Judge Phillips's finding. Harry Reid, the majority leader, may be to blame for the clumsy handling of the Senate. But the Log Cabin case would by now be moot if Mr Obama had moved faster to repeal “don't ask, don't tell”. Why the rigmarole of a military survey before enacting a measure most Americans already favoured? Maybe he over-learned the lesson of the clobbering Bill Clinton got when he barged into this area right at the start of his presidency. Not for the first time—think only of Guantánamo (still open) and his decision to let Congress make the running (crawling, more like) on health reform—Mr Obama is paying a price for his caution.





Economist.com/blogs/lexington