Washington CNN  — 

The Department of Homeland Security violated the First Amendment when it allegedly tracked and interrogated five journalists between 2018 and 2019, the American Civil Liberties Union said in a lawsuit filed Wednesday.

The lawsuit includes accounts by five freelance photojournalists, all of whom are US citizens and were stopped by Customs and Border Protection, an agency within DHS, while traveling to and from Mexico between November 2018 and January 2019.

At the time, the journalists were documenting a group of migrants who were traveling to the US-Mexico border.

In March, San Diego’s NBC 7 reported it had obtained documents showing that CBP officials in the San Diego region kept a list of people to pull aside for further screening when crossing the US-Mexico border.

All five journalists in the filing – Bing Guan, Go Nakamura, Kitra Cahana, Ariana Drehsler and Mark Abramson – were sent to secondary inspection and questioned about their work at least once. Cahana and Drehsler were pulled aside on more than one occasion, according to the lawsuit.

“When I saw my photo crossed out in a secret government database, I realized the secondary screening and interrogation weren’t random. I was being targeted by my own government for reporting on conditions at the border,” Guan said in a statement.

The government database included headshots and identifying information, such as date of birth and “role” as it related to the migrant caravan, the station reported. Of the 59 individuals profiled in screenshots obtained by the station, 10 were described as “media” or “journalist,” according to the lawsuit. The database also contained information about lawyers and activists.

Immigrant advocacy groups and lawmakers raised alarm about the media report at the time it was released, calling on the administration to provide answers. Shortly after, the Department of Homeland Security inspector general’s office launched an investigation to the “policies and practices” of CBP.

NBC 7 has since reported that a veteran of the city’s Homeland Security Investigations office shared the information with the station. Special Agent Wes Petonak recalled coming across the database which he found concerning. Petonak was placed on administrative leave earlier this year for an unrelated incident and eventually terminated.

According to Wednesday’s lawsuit, Guan, one of the journalists targeted, was questioned about his work, which has been featured in publications worldwide, by US border officers on December 29, 2018. A few days prior, Guan had been in Mexico covering the migrants near the border.

“In addition to asking Mr. Guan this biographical information, the officer asked whether Mr. Guan knew smugglers, activists, or journalists who assisted migrants in crossing the border. The officer also told Mr. Guan: ‘I know you’ve been around the migrant caravan,’” the lawsuit reads.

The officer asked to see Guan’s photographs. Guan complied and was later allowed into the US.

Earlier this year, Customs and Border Protection acknowledged that it identified people who may have had information related to two separate border incidents in the region, but said that “efforts to gather this type of information are a standard law enforcement practice.”

“CBP does not target journalists for inspection based on their occupation or their reporting. CBP has policies in place that prohibit discrimination against arriving travelers and has specific provisions regarding encounters with journalists,” said then-agency spokesman Andrew Meehan.

The ACLU, which brought the lawsuit on behalf of the five journalists, asks the court to declare DHS, through its actions, violated the First Amendment, grant relief as deemed appropriate, and call on the government to delete records obtained through the “unlawful questioning.”

The lawsuit has been filed in the US District Court for the Eastern District of New York.