Updated

President Barack Obama's remarks that the military's "don't ask, don't tell" policy weakens national security shows it should be declared unconstitutional, a lawyer for the nation's largest Republican gay rights group told a federal judge Tuesday.

Attorney Dan Woods said in his opening statement of a U.S. District Court trial that he plans to use the president's statements to support a lawsuit by the Log Cabin Republicans that has put the government in the position of defending the policy while Obama is pushing Congress to repeal it.

U.S. District Judge Virginia A. Phillips is conducting a non-jury trial of the lawsuit, the broadest challenge to the policy in recent years.

The 19,000-member Log Cabin Republicans include current and former military members.

Woods said that if the lawsuit prevails he will ask the judge to immediately halt use of the policy.

"Don't ask, don't tell" prohibits the military from asking about the sexual orientation of service members but requires discharge of those who acknowledge being gay or are discovered to be engaging in homosexual activity, even in the privacy of their own homes off base.

"Our military excludes these men and women from service solely on the basis of status and conduct that is constitutionally protected," Woods said in his opening. "We aim to show you at this trial that there is no legitimate basis for 'don't ask, don't tell,' and there never has been."

U.S. Department of Justice attorney Paul G. Freeborne presented the policy's legislative history but said the government would not present any other evidence or witnesses.

Freeborne said the Log Cabin Republicans were trying to force change through the courts when it should be up to Congress.

"LCR's entire case is at its core an attempt to re-do those proceedings before Congress," he said.

Some legal experts say the trial could not come at a worse time for Obama, who derided the policy but has failed to get it off the books since taking office last year. Not only are midterm elections approaching, but the group suing the U.S. government is Republican.

"This trial is taking place as a direct consequence of the president's political decision in January 2009 to put the repeal of this law on the back burner," said Richard Socarides, an attorney and a senior adviser to President Bill Clinton on gay rights issues. "We shouldn't still be living under a law that excludes people from military service because they are gay."

Socarides asserted that the Justice Department's defense of the policy in court is nonsensical.

"On the one hand, the president has said he's working hard to stop these discharges. And on the other hand, the Justice Department is spending taxpayer dollars defending their ongoing right to kick people out," Socarides said.

In a statement e-mailed to The Associated Press, the Justice Department said it is "defending the statute, as it traditionally does when acts of Congress are challenged."

But the agency also noted the position of Obama, who is working with military leaders and Congress to repeal the law.

"The president believes and has repeatedly affirmed that 'don't ask, don't tell' is a bad policy that harms our national security and undermines our military effectiveness because it requires the discharge of brave Americans who wish to serve this country honorably," the Justice Department said.

The government tried to block the case from going to trial, arguing among other things that it was unnecessary because of congressional debate.

The U.S. House voted May 27 to repeal the policy, and the Senate is expected to take up the issue this summer.

In deciding to hear the challenge, Phillips said the "possibility that action by the legislative and executive branches will moot this case is sufficiently remote."

Woods said he wants an injunction. If that happens and the government appeals, Woods said he will ask Phillips to suspend the policy until the case is decided.

The case is unique in that it is not based on an individual's complaint but rather is a broad, sweeping attack on the policy.

The group says more than 13,500 service members have been fired under the law since 1994.

Gay troops at bases in the West have greater protections than their colleagues around the globe because of a 2008 ruling by the 9th U.S. Circuit Court of Appeals that forced the military to apply a much higher threshold in determining whether a service member should be dismissed for being gay.

That ruling was in a lawsuit filed by Air Force Maj. Margaret Witt, a decorated flight nurse, who argued her dismissal actually hurt troop readiness and morale because there was a shortage of flight nurses at the time. The court ruled that for a gay service member's discharge to be constitutional, the military must demonstrate that the firing promotes cohesion or discipline in the unit.

Known as the "Witt standard," it became law in the court's jurisdiction covering Alaska, Arizona, California, Hawaii, Idaho, Montana, Nevada, Oregon and Washington.

"One option for the judge is to sit on it awhile and see if Congress goes ahead and does repeal it," said Paul Smith, a civil rights attorney in Washington, D.C. "It seems to me most federal judges would go about with the case and let the chips fall where they may."