Navy Adm. Michael Rogers, director of the National Security Agency , testifies before the Senate Armed Services Committee earlier this month. (Chip Somodevilla/Getty Images)

A public advocate appointed by the nation’s secretive surveillance court last year argued that a little-known provision of the PRISM program, which enables the FBI to query foreign intelligence information for evidence of domestic crime, violated the Constitution.

But the court disagreed with her.

The Foreign Intelligence Surveillance Court asked Amy Jeffress, the advocate, in August to assess the provision, according to a court opinion filed in November but released by the intelligence community only on Tuesday.

The court, which weighs government applications for surveillance, traditionally hears arguments only from the government in closed sessions. Its opinions generally are classified.

Jeffress, a former federal prosecutor and Justice Department official now in private practice, was the first public advocate or “amicus curiae” appointed under the USA Freedom Act, a law enacted in June to impose new limits and greater transparency on government surveillance.

PRISM is an intelligence-gathering program whose name and scope were disclosed in June 2013 through leaks of documents by Edward Snowden, a former National Security Agency contractor.

It involves the collection of email, instant-message chats and videos from major tech companies including Google, Yahoo, Microsoft, Facebook and Apple for foreign intelligence purposes. The targets are foreigners overseas, although they can be in communication with Americans. The material is gathered by the NSA, but is shared with other agencies, such as the CIA and the FBI.

Jeffress raised concerns about the way the program’s rules allowed the FBI to query that data using email addresses and other “selectors” of U.S. people for “purposes of any criminal investigation” — that is, for purposes not related to foreign intelligence.

“There is no requirement that the matter be a serious one, nor that it have any relation to national security,” she said in a brief, according to the opinion by Judge Thomas F. Hogan of the Foreign Intelligence Surveillance Court.

“These practices do not comply with . . . the Fourth Amendment,” she wrote, according to Hogan’s redacted opinion. They go “far beyond the purpose” for which the data is gathered, she said.

Jeffress urged the court to strengthen the procedures to “require a written justification for each U.S. person query of the database that explains why the query is relevant to foreign intelligence information or is otherwise justified,” the opinion said.

Hogan, however, did not agree with Jeffress, a partner at Arnold & Porter who had served as chief of the national security section in the U.S. Attorney’s Office for the District of Columbia.

The judge noted that there was no statutory requirement that all activities involving PRISM data serve “solely a foreign intelligence requirement.” He said that the Foreign Intelligence Surveillance Act, which covers PRISM, “expressly requires” that the government permit the retention of data that is evidence of a crime regardless of whether it relates to foreign intelligence or national security.

“It would be a strained reading” of the rules to allow the FBI to retain PRISM information constituting evidence of a crime by a U.S. person, but to bar the bureau from querying the data to find such evidence, Hogan wrote.

Under the USA Freedom Act, which established the public advocate program, the advocate may not appeal the judge’s ruling. The law permits a judge to ask for an advocate’s opinion on significant matters, especially those that may have an effect on privacy and civil liberties.

A July 2014 report by the Privacy & Civil Liberties Oversight Board, an independent executive branch watchdog, also found fault with the FBI practice. The board said the public should know that not only are bureau personnel permitted to query the data for criminal purposes, but that “many do conduct such queries.” It also said there should be greater limits on the queries.

Two members, including Chairman David Medine and Patricia Wald, recommended that a surveillance court judge approve every kind of search involving a U.S. person as being likely to return information relevant to an investigation of a crime.

Members Rachel Brand and Elisebeth Collins Cook instead recommended that analysts obtain a supervisor’s approval before looking at any information about the U.S. person who was queried.

Jeffress’s briefs, which lay out her full arguments, have not been made public. Hogan’s opinion was released by the Office of the Director of National Intelligence.

PRISM was authorized under Section 702 of the FISA Amendments Act, a 2008 law passed in the wake of the controversy over warrantless wiretapping by the NSA, which began under the George W. Bush administration. It will be up for reauthorization next year.