A federal judge has ruled unconstitutional national security provisions that permit federal investigators to access customer information from some companies without court approval.

The provisions "suffer from significant constitutional infirmities," and violate the First Amendment and separation of powers, Judge Susan Illston of the District Court for the Northern District of California wrote in an order, said Reuters.

The judge's decision stems from a "National Security Letter" that the Federal Bureau of Investigation issued to an unnamed telecommunications company, according to the Electronic Frontier Foundation.

The National Security Letter provision of the Patriot Act expanded the FBI's authority to demand personal customer records from Internet service providers, financial institutions and credit companies without prior court approval, Reuters said.

The letter to the telecommunications company sought "subscriber information" from the company, and warned that the letter's disclosure could result "in a danger to the United States," among other ramifications, according to the decision.

In the lawsuit, the company challenged the constitutionality of the laws, while the government opposed it and filed its own lawsuit, according to Reuters.

"The government has a strong argument that allowing the government to prohibit recipients of NSL's from disclosing the specific information sought in NSL's to either the targets or the public is generally necessary to serve national security in ongoing investigations," Illston wrote. "However, the government has not shown that it is generally necessary to prohibit recipients from disclosing the mere fact of their receipt of NSLs."