NBC San Diego and the Reporters Committee for Freedom of the Press (RCFP) filed a federal lawsuit this week that challenges the Trump administration’s refusal to release detailed information about a database used to track journalists, attorneys and immigration advocates at the San Ysidro border crossing.

In March, NBC 7 Investigates obtained internal documents and screenshots that showed how U.S. border agents have compiled information on -- and kept track of -- “organizers, instigators, and media tied to the Migrant Caravan.”

The documents were provided to NBC San Diego by a Department of Homeland Security (DHS) employee who requested anonymity due to fear of retaliation for sharing sensitive information with the media.

The U.S. government created a secret database of activists, journalists, and social media influencers tied to the migrant caravan. NBC 7's Mari Payton has more.

That DHS source said these intelligence-gathering efforts were done under the umbrella of “Operation Secure Line,” a DHS initiative that monitors the Central American migrant caravan. The source said the SharePoint application or database was used by agents from Customs and Border Protection (CBP), Immigration and Customs Enforcement (ICE), the U.S. Border Patrol, Homeland Security Investigations and agents with the San Diego sector of the Federal Bureau of Investigation (FBI).

According to the documents, the database lists U.S. and foreign citizens who should be subjected to secondary screenings at the border. In some cases, “alerts” have been placed on those citizen’s passports. Those alerts prevented at least three attorneys and a photojournalist from entering Mexico to provide legal assistance to caravan members, or document the caravan’s presence in Tijuana.

NBC San Diego asked all of the border agencies associated with the database questions about how it was created, how it was used and whether the tactics were legal. The agencies did not answer those questions.

Instead, a CBP spokesperson sent a broad statement stating the agency's tactics were in response to new challenges agents were facing while protecting the border. The spokesperson later said all names in the database were people who were present during violence that broke out at the border in November 2018 and January 2019.

Journalists, attorneys and immigration advocates NBC spoke with said they were not present for either of those violent incidents, nor were they asked about those incidents during secondary inspections.

“Efforts to gather this type of information are a standard law enforcement practice,” said CBP’s assistant commissioner of public affairs, Andrew Meehan. “CBP does not target journalists for inspection based on their occupation or their reporting.”

Federal lawmakers reacted to NBC’s initial reporting by demanding information and documentation from CBP and DHS administrator. Those lawmakers set deadlines for the receipt of that information, but those deadlines passed in March, and CBP and DHS have not responded to those requests for information.

Given the lack of answers provided about the surveillance program, NBC San Diego filed a Freedom of Information Act (FOIA) request with DHS, CBP, ICE and USCIS for documents and emails related to the database.

Specifically, the FOIA request asks for records related to “Operation Secure Line” and the creation of the SharePoint application used by agents, as well as emails shared between agencies monitoring the migrant caravan.

The RCFP filed a separate but similar request for records, including policies and procedures related to the surveillance of journalists by federal agents.

A week after NBC 7 filed the FOIA requests, CBP approved the expedited release of records and a fee waiver for costs. But CBP has yet to produce any documents.

An RCFP attorney said the federal agencies have also not responded to the committee’s request for public documents.

“NBC 7’s reporting that the government has tracked journalists and, in some cases, stopped and questioned journalists at the border, is deeply troubling,” said Katie Townsend, RCFP’s legal director. “Journalists should not be monitored or questioned by government officials based on the subject matter of their reporting.”

To read the lawsuit, click here.

On Monday, RCFP’s attorneys asked the court to order the border agencies to immediately process the requested records and to prohibit them from withholding any records not exempt under FOIA. None of the agencies have responded yet to the lawsuit.

“The Reporters Committee believes it is vital for the public to know more about the government's treatment of reporters covering issues at the U.S./Mexico border,” Townsend said. “We are proud to be working with NBC 7 in this lawsuit to pry that additional information from the government.”

Meanwhile, the CBP Office of Professional Responsibility and the Office of Inspector General in the Department of Homeland Security have launched separate investigations into the surveillance program.

No date was given on when those reviews are expected to be completed.