Three military veterans who were discharged under the law that prohibits gays from serving openly in uniform sued the government Monday to be reinstated and to pressure lawmakers to repeal the "don't ask, don't tell" law before a new Congress is sworn in.

The lawsuit filed in U.S. District Court in San Francisco also seeks to have the ban on openly gay troops declared unconstitutional and therefore unenforceable for any service members.

"I don't feel like I'm going up against the military, I really don't. I just feel like this is a necessary step for doing away with this policy," said former Air Force Staff Sgt. Anthony Loverde. "I believe the military, the majority of troops I've served with, and those who have been studied to death are with us."

The 31-year-old Loverde is working in Iraq for a private military contractor that's providing the Army with technical support. The lawsuit was also filed on behalf of former Air Force Maj. Michael Almy, 40, and former Navy Petty Officer Second Class Jason Knight, 28.

The legal action came four days after the U.S. Senate for the second time this year blocked a military spending bill that also would have repealed the 17-year-old ban on openly gay troops.

Sens. Susan Collins, R-Maine, and Joe Lieberman, I-Conn., have introduced a standalone measure, but it's uncertain if it will be brought for a vote before the Senate and House adjourn for the holidays.

Servicemembers Legal Defense Network director Aubrey Sarvis said the lawsuit was meant as a warning to lawmakers that if they don't act to repeal "don't ask, don't tell," the courts could step in and order an integration timetable that is less to the Pentagon's liking.

"If the Senate fails to act in the lame duck session, we are prepared to litigate this aggressively," said Sarvis, whose group coordinated the lawsuit and prepared it with lawyers from a private law firm.

"From my perspective, this is the first shot over the bow," he said.

The move also was aimed at validating the concerns of Defense Secretary Robert Gates, a named defendant in the suit, along with the service chiefs of the Navy and Air Force.

A Pentagon study unveiled this month found that two-thirds of troops thought repealing the gay ban would have little affect on their units. Gates then joined President Barack Obama in urging the Senate to end "don't ask, don't tell."

He reiterated Friday that if lawmakers do not act, military leaders could end up "at the mercy of the courts and all of the lack of predictability that that entails."

A federal judge in Riverside, Calif., ruled in a different lawsuit in September that the gay ban violates the due process and free speech rights of gay Americans.

U.S. District Judge Virginia Phillips issued a worldwide injunction immediately stopping enforcement of the ban, but the 9th U.S. Circuit Court of Appeals suspended Phillips' order.

The suit filed Monday makes the same constitutional claims — rooted in a 2003 U.S. Supreme Court position — that private and consensual homosexual activity cannot be outlawed.

It also relies on a 2008 decision from the 9th Circuit that the Air Force violated the civil rights of flight nurse Margaret Witt when it fired her under "don't ask, don't tell" without demonstrating she needed to be removed to protect her reserve unit's cohesion or readiness.

Lawyers for the three plaintiffs in the latest suit plan to contend that allowing gay service members to serve openly actually strengthens the armed forces by not requiring them to keep their sexual orientations a secret.

Almy, a decorated officer who was in the Senate chambers last week when Republicans refused to let the repeal measure advance, said he still hopes lawmakers can be persuaded to take up the standalone bill even if it means postponing their vacations.

The son of an Air Force officer who did not know his son was gay, Almy was discharged in 2006 after another member of the Air Force searching his computer files found a private e-mail Almy had written to another man when he was in Iraq. His 13-year career ended with his being given a police escort off base.

"I spent four Christmases deployed in the Middle East," he said. "If we can make that kind of sacrifice for our nation, certainly our senators can give up a Christmas to get this done."