Updated at 10:02 p.m. ET
A federal judge in Southern California on Thursday declared the U.S. military's ban on openly gay service members unconstitutional because it violates the First Amendment rights of gay and lesbians.
U.S. District Judge Virginia Phillips granted a request for an injunction halting the government's "don't ask, don't tell" policy for gays in the military.
Phillips said the policy doesn't help military readiness and instead has a "direct and deleterious effect" on the armed services.
The lawsuit was the biggest legal test of the law in recent years and came amid promises by President Obama that he will work to repeal the policy.
Government lawyers argued Phillips lacked the authority to issue a nationwide injunction and the issue should be decided by Congress.
The injunction was sought by the Log Cabin Republicans, a 19,000-member group that includes current and former military members.
Government lawyers argued that Phillips lacked the authority to issue a nationwide injunction and Congress should decide the policy's fate.
The U.S. House voted in May to repeal the policy, and the Senate is expected to address the issue this summer.
"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 engaging in homosexual activity, even in the privacy of their own homes off base.
Log Cabin Republicans said more than 13,500 service members have been fired since 1994.
Attorney Dan Woods, who represents the group, contended in closing arguments of the nonjury trial that the policy violates gay military members' rights to free speech, due process and open association.
He also argued that the policy damages the military by forcing it to reject talented people as the country struggles to find recruits in the midst of a war.
U.S. Department of Justice attorney Paul G. Freeborne argued that the policy debate is political and the issue should be decided by Congress rather than in court.
Six military officers who were discharged under the policy testified during the trial. A decorated Air Force officer testified that he was let go after his peers snooped through his personal e-mail in Iraq.
Lawyers also submitted remarks by Mr. Obama stating "don't ask, don't tell" weakens national security.
© 2010 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.