WASHINGTON – The Senate dealt another punch Thursday — this one potentially fatal — to the legislative effort to end the military’s “don’t ask, don’t tell” policy. The result infuriated gay-rights groups and thwarted a months-long push by President Obama and the Democratic leadership to force a vote on the issue.

The action, on a 57-40 procedural vote, left supporters of ending the 17-year-old ban on gays serving openly in the military scrambling for new avenues to overturn it, and raised the possibility that federal courts ultimately will step in.

Two key supporters — Sens. Joseph Lieberman, I-Conn., and Susan Collins, R-Maine, the lone Republican voting to advance the bill — said they plan to introduce a separate piece of legislation, but with time winding down on the congressional calendar and a more conservative tilt coming to Capitol Hill next year, passage seems unlikely.

Obama, who spent time in recent days phoning lawmakers about the ban, urged senators to reconsider the defense bill before the end of the lame-duck session.

“Despite having the bipartisan support of a clear majority of senators, a minority of senators are standing in the way of the funding upon which our troops, veterans and military families depend,” the president said in a written statement. “This annual bill has been enacted each of the past 48 years, and our armed forces deserve nothing less this year.”

The year’s last and best effort to end the policy came Thursday afternoon on a Senate procedural vote to move forward with debate on a far-reaching policy bill for the Pentagon that included two pages — out of more than 850 — spelling out the end of the ban.

Although 54 Democrats, two independents and Collins voted to move forward with the National Defense Authorization Act, the total fell short of the necessary 60 votes.

“We’ve tried every possible way to do this,” Senate Majority Leader Harry Reid, D-Nev., said in an speech laced with exasperation before the vote. Reid, focused on time running out for the session, frustrated Collins and others by calling the vote even though he knew they might lose.

Every other Republican and one Democrat, Sen. Joseph Manchin of West Virginia, held firm on a vow to block any legislation that does not address tax cuts or government spending. Three senators serving in the military — Scott Brown, R-Mass., Lindsey Graham, R-S.C.. and Mark Kirk, R-Ill. — voted against moving forward.

The Defense Department had no immediate comment on Thursday’s vote. Defense Secretary Robert Gates, Joint Chiefs of Staff Chairman Mike Mullen and other senior military leaders had pressed senators last week to overturn the ban and allow the Pentagon to gradually phase it out. Gates and Mullen warned of potential chaos in the ranks if federal courts ordered an immediate end to the policy.

The final drama came during Thursday’s roll-call vote ending more than a week of negotiations with Reid, Collins and Lieberman. Those talks collapsed early Thursday, but Collins continued trying during the vote to negotiate for more time to consider the legislation.

Fifty-seven members of the Democratic caucus were willing to support the legislation, and two Republicans were ready to join Collins: Brown and Sen. Lisa Murkowski of Alaska. However, the trio was demanding four days of debate and the ability to offer 10 amendments to the Pentagon bill, with Democrats allowed to offer five.

When Reid said no, Collins erupted, angrily waving her arms about the process. She huddled with Lieberman and Senate Armed Services Chairman Carl Levin, D-Mich., reading through legislative language on the floor. She opposed the process Reid had laid out, so Brown and Murkowski voted no. Collins waited until it was clear that the legislation had failed and then voted with Democrats to proceed on the measure.

“There was a clear path forward to complete action on this important bill,” she said at a news conference afterward, blasting Reid for holding the vote prematurely. “I am perplexed and frustrated that this important bill is going to become a victim of politics.”

Thursday’s defeat ended more than two years of coordinated efforts by dozens of gay-rights and liberal groups to ensure Obama made good on a 2008 campaign pledge to end the ban through legislation or executive action.

With congressional options dwindling, the president could order the Justice Department to stop appealing federal court cases challenging the constitutionality of the law, or use his powers as commander in chief to issue a stop-loss order halting military discharges and the removal of any gay troops in violation of the ban.

“I think the president strongly believes that one of two things is going to happen: Either Congress is going to solve this legislatively, or the courts are going to solve this,” White House press secretary Robert Gibbs said Thursday before the vote. “The policy is going to come to an end.”