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.

Read More