FILE - This Nov. 25, 2018 file photo shows migrants near the Chaparral border crossing watch clashes with U.S. border agents, seen from Tijuana, Mexico. A San Diego TV station says the U.S. government ran an operation to screen journalists, activists and others while investigating last year's migrant caravan from Mexico. KNSD-TV says documents leaked by a Homeland Security source show a January database listing at least 10 journalists, seven of them U.S. citizens, as warranting secondary screening at U.S. points of entry. (AP Photo/Ramon Espinosa, File)

FILE - This Nov. 25, 2018 file photo shows migrants near the Chaparral border crossing watch clashes with U.S. border agents, seen from Tijuana, Mexico. A San Diego TV station says the U.S. government ran an operation to screen journalists, activists and others while investigating last year's migrant caravan from Mexico. KNSD-TV says documents leaked by a Homeland Security source show a January database listing at least 10 journalists, seven of them U.S. citizens, as warranting secondary screening at U.S. points of entry. (AP Photo/Ramon Espinosa, File)

SAN DIEGO (AP) — The U.S. government kept a database on journalists, activists, organizers and “instigators” during an investigation into last year’s migrant caravan, infuriating civil liberties and media groups who called it a blatant violation of free speech rights.

U.S. Customs and Border Protection compiled information on dozens of people that included passport and social media photos, dates of birth, personal information and their suspected role in the caravan. Some of the people on the list were denied entry into Mexico and had their passports flagged or visas revoked.

On Thursday, officials said the department’s independent watchdog was looking into the database, and stressed that journalists were not targeted based on their occupation or reporting.

ADVERTISEMENT

“CBP has policies in place that prohibit discrimination against arriving travelers and has specific provisions regarding encounters with journalists,” said Andrew Meehan, assistant commissioner of public affairs.

The database was revealed Wednesday by the San Diego TV station KNSD. People listed in the documents provided to the station included 10 journalists, many of whom are U.S. citizens, and an American attorney. There were several dozen people in all on the list, including many labeled as “instigators.”

The intelligence-gathering efforts were done as part of “Operation Secure Line,” which was designed to monitor the caravan of thousands of people who began making their way north from Central America last year to seek asylum in the United States.

The government compiled the database at a time when the caravan was attracting considerable attention in the White House around the midterm elections, with President Trump repeatedly tweeting about the group.

Customs and Border Protection officials said extra security was implemented after a breach of a border wall in San Diego on Nov. 25 in a violent confrontation between caravan members and border agents. The confrontation closed the nation’s busiest border crossing for five hours on Thanksgiving weekend.

Officials said it was protocol to follow up on such incidents to collect evidence, and determine whether the event was orchestrated.

Such “criminal events ... involving assaults on law enforcement and a risk to public safety, are routinely monitored and investigated by authorities,” according to a statement from Customs and Border Protection.

“CBP will continue to maintain a high standard of accountability and transparency with the media and public,” Meehan said.

Lawyers and immigrant rights groups were going back and forth across the U.S.-Mexico late last year to help thousands of people who arrived at the border manage a complicated clogged asylum process and to help provide humanitarian aid as conditions worsened and illness spread. Journalists from several news organizations were also there to chronicle the story.

Bing Guan, a freelance journalist from New York and student at the International Center of Photography, said he and a colleague were stopped by U.S. agents while returning from Tijuana in December. A plainclothes agent who didn’t identify his agency showed Guan a multi-page document with dozens of photos and asked him to identify people in the images. The agent then asked Guan to show him the photos he had taken in Tijuana.

Guan said the report of the dossiers confirmed the long-held suspicions he and other journalists had.

“It’s sort of a weird combination of paranoia and pride,” Guan said. “Paranoia because our own government is conducting these intelligence gathering tactics and these patterns of harassment in order to deter journalists from doing their jobs, but also a little bit of pride because I feel like I’m on the right track,” Guan said.

Two House Democrats asked CBP Commissioner Kevin McAleenan for any instructions to officers on the 59 people named, an explanation of why they were included and how often they were stopped for additional questioning.

“The appearance that CBP is targeting journalists, lawyers, and advocates, and particularly those who work on immigration matters or report on border and immigration issues, raises questions about possible misuse of CBP’s border search authority and requires oversight to ensure the protection of Americans’ legal and constitutional rights,” wrote Reps. Bennie Thompson of Mississippi and Kathleen Rice of New York, who both serve on the Homeland Security Committee.

The database was denounced by a variety of groups, including the Committee to Protect Journalists, American Civil Liberties Union, Amnesty International and the Southern Poverty Law Center.

The database was built at a time of increasingly tense relations between the Trump administration and journalists, with Trump calling some members of the press the “enemy of the people.” There has also been an increase in false news stories proliferating on social media on both the left and right.

The Department of Homeland Security last year sought a contractor to monitor more than 290,000 news sources and social media around the world in several languages, and compile a database of journalists, editors, foreign correspondents and bloggers. DHS officials said the aim was to gather open-source information, not unlike alerts the public can set up through email.

And according to documents obtained through a Freedom of Information Act request by The Nation, U.S. Immigration and Customs Enforcement, another part of Homeland Security, tracked a series of anti-Trump protests in New York City last year, including several that promoted immigrants’ rights and one organized by a member of Congress.

The caravan documents, dated Jan. 9, are titled “San Diego Sector Foreign Operations Branch: Migrant Caravan FY-2019, Suspected Organizers, Coordinators, Instigators and Media.” According to the San Diego station, the material was used by Homeland Security and other agencies, including some FBI agents.

One dossier was on Nicole Ramos, the refugee director and attorney for Al Otro Lado, a law center for migrants and refugees in Tijuana, Mexico. It included details such as the kind of car she drives and her mother’s name, KNSD-TV reported.

A photographer working for The Associated Press was also on the list.

The Mexican government, which denied entry to some of the people in the database, said it disapproved of spying and didn’t do “illegal surveillance.” Mexican officials also said they would ask the U.S. to clarify any possible cases of “illegal spying.”

“Mexico welcomes all foreign visitors who, obeying immigration laws, carry out in our territory tourism or professional activities,” according to a joint statement from the Foreign Relations Department and the Department of Security and Citizen Protection.

___

Long reported from Washington. Associated Press Writers Nomaan Merchant in Houston and Peter Orsi in Mexico City contributed to this report.