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.

ADVERTISEMENT

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 Barack Obama that he will work to repeal the policy.

FULL AP STORY FOLLOWS BELOW