A federal judge in Riverside declared the U.S. military’s ban on openly gay service members unconstitutional Thursday, saying the “don't ask, don't tell” policy violates the 1st Amendment rights of lesbians and gay men.

U.S. District Court Judge Virginia A. Phillips said the policy banning gays did not preserve military readiness, contrary to what many supporters have argued, saying evidence shows that the policy in fact had a “direct and deleterious effect’’ on the military.

Phillips said she would issue an injunction barring the government from enforcing the policy. However, the U.S. Department of Justice, which defended “don’t ask, don’t tell” during a two-week trial in Riverside, will have an opportunity to appeal that decision.

The ruling comes just over a month after a federal judge in San Francisco tossed out California’s voter-approved ban on same-sex marriage, providing back-to-back victories for gay rights advocates seeking policy changes in the courts that have eluded them in Congress and at the ballot box. The case was filed by the Log Cabin Republicans, the largest political organization for gays in the GOP, in 2004.

[Updated at 6:30 p.m.: "As an American, a veteran and an Army reserve officer, I am proud the court ruled that the arcane ‘don't ask, don't tell’ statute violates the Constitution,” said R.Clarke Cooper, executive director of the Log Cabin Republicans & Liberty Education Fund. “Today, the ruling is not just a win for Log Cabin Republican service members, but all American service members."]

The ruling is expected to intensify political pressure in Washington to act on legislation to repeal “don’t ask, don’t tell," which remains stalled in the Senate despite support from President Obama and the Democratic congressional leadership.

President Obama has called the ban a threat to national security, and the U.S. House in May passed legislation to repeal “don’t ask, don’t tell” if an ongoing Pentagon study determines the military can adapt to the change without harming defense readiness.

Despite Obama’s criticism of the policy, the Justice Department vigorously defended “don’t ask, don’t tell’’ and even tried to undercut the case with a technical legal challenge over whether the named plaintiffs were dues-paying members of the organization that filed the lawsuit: the Log Cabin Republicans.

-- Phil Willon in Riverside County