Arizona Senator John McCain has altered course on repeal of “Don't Ask, Don't Tell,” the law that bans gay and bisexual troops from serving openly.

McCain, the ranking Republican on the Senate Armed Services Committee, led the GOP in opposition to repeal of the 17-year-old law. He twice united Republicans in blocking repeal of the law.

When it became clear that several Republicans had defected to support its repeal, McCain, sensing defeat, said on the Senate floor: “Today is a very sad day.”

But in a Fox News interview on Thursday, McCain altered course, saying he was prepared to work on the implementation of repeal.

“I think I have to do everything I can to make sure that the impact on the morale, retention, recruitment and battle effectiveness of the military is minimized as much as possible,” McCain said. “It is a law and I have to do whatever I can to help the men and women who are serving, particularly in combat, cope with this new situation. I will do everything I can to make it work.”