SAN FRANCISCO - 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," former Air Force Staff Sgt. Anthony Loverde said. "I really don't. I just feel like this is a necessary step for doing away with this policy. I believe the military, the majority of troops I've served with, and those who have been studied to death are with us."

Loverde, 31, is working in Iraq for a private military contractor. 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 Senate for the second time this year blocked a military spending bill that also would have repealed the 17-year-old ban.

Sens. Susan Collins (R., Maine) and Joe Lieberman (I., Conn.) have introduced a stand-alone measure, but it's uncertain if it will be brought for a vote before Congress adjourns for the holidays.

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

The move also was aimed at validating the same concern on the part of Defense Secretary Robert M. Gates, a named defendant in the suit.

A Pentagon study released this month found that two-thirds of troops believed repealing the policy would have little effect on their units. Gates then urged the Senate to end it rather than end up "at the mercy of the courts."

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

U.S. District Judge Virginia Phillips issued a worldwide injunction stopping enforcement of the ban, but the U.S. Court of Appeals for the Ninth Circuit suspended her order.