Mark Udall’s amendment to strip out indefinite detention provisions from the defense authorization bill failed today, and the bill will likely pass the Senate with the provisions intact.

The Senate soundly defeated a move to strip out controversial language requiring mandatory detention of some terror suspects, voting it down 61 to 37 and escalating a fight with the Obama administration over the future course of the war on terror.

The proposed amendment to the massive National Defense Authorization Act would require the FBI and other civilian law enforcement agencies to transfer al-Qaida suspects arrested overseas on charges of planning or carrying out a terror attack into military custody. It wouldn’t apply to American citizens, but the change has drawn strong opposition from civil rights groups and the White House, which has promised to veto the defense bill if that language was included.

That’s not quite right. They have promised to veto the bill, but it’s not entirely clear why, or if they will swallow hard and agree to the detention statute. In previous defense bills, the Administration has allowed passage of measures on detentions and Guantanamo that they did not support entirely.

Here’s the roll call. Udall got just 2 Republicans (Rand Paul and Mark Kirk) and 35 Democrats for his measure. The New England Three all voted to preserve the indefinite detention language. The good news, if there is any, is that Udall got enough votes to block a veto override, if it came to that. Marcy Wheeler has the rundown of the Democratic no votes, which include some surprises (Whitehouse?).

There is a sense that this was a battle of two wrong sides, between codifying indefinite detention in the law versus allowing the executive branch to guide their own regime without legal checks and balances. There’s also the issue of expanding the use of the Authorization to Use Military Force to allow for the detention of a much larger range of suspects. But I don’t think that codification is a good idea in any case, especially because of what the language allows regarding US citizens.

If Obama follows through with the veto, there will have to be some change to the bill, if the 37 voting for the Udall amendment hold out. I smell an unsatisfying compromise.