A federal judge in California has ruled the military's ban on gay troops serving openly to be unconstitutional.

U.S. District Judge Virginia A. Phillips ruled the Pentagon's “Don't Ask, Don't Tell” policy violated the First Amendment rights of gay troops. She said the policy has a “direct and deleterious effect” on the armed services.

President Barack Obama says he supports repeal of the Clinton-era law, but administration lawyers defended the policy at the two-week trial. Lawyers argued the policy was necessary for military readiness, but stuck to its legislative history.

“It again must be noted that Defendants called no witnesses, put on no affirmative case, and only entered into evidence the legislative history of the Act,” Phillips wrote in her 85-page ruling.

Gay GOP group Log Cabin Republicans challenged the policy.

In his opening remarks, plaintiffs' lead lawyer Dan Woods said the military excludes gay troops from service “solely on the basis of status and conduct that is constitutionally protected.”

“No matter how I look at this issue,” Woods said, “I cannot escape being troubled by the fact that we have in place a policy which forces young men and women to lie about who they are in order to defend their fellow citizens.”

Congress is currently debating whether to repeal the 1993 law. House members voted for repeal in May, and Senate Majority Leader Harry Reid has promised a vote in the Senate this month. Republicans, led by Arizona Senator John McCain, have promised to filibuster the bill. Advocates of repeal say they expect opponents to offer last-minute amendments striking out the repeal language.

Servicemembers Legal Defense Network (SLDN), the largest group lobbying for repeal, said it was pleased with the ruling but insisted Congress needs to repeal the law.

“We're pleased by the judge's decision, but this decision is likely to be appealed and will linger for years,” Aubrey Sarvis, executive director of the group, said. “Congress made the DADT law 17 years ago and Congress should repeal it. The Senate will have the opportunity to do just that this month and most Americans think the Senate should seize it.”

Among the service members who testified at the trial was Joseph Rocha, who was discharged from the Navy in 2007 after he violated the policy. He came out to his commanding officer after suffering two years of abuse from shipmates while on duty on the island of Bahrain between 2004 and 2006.

Taunting and bullying at the hands of his chief master-at-arms Michael Toussaint began soon after Rocha declined to take a female prostitute in 2004. Rocha said he did not report the abuse because he was afraid of losing his job.

“I'm confident that, at least personally, had 'Don't Ask, Don't Tell' not been the policy, I would have felt confident to report the abuse when it escalated, and not fear reprisal,” Rocha testified.