In what looks like a coordinated attack on constitutional rights, the U.S. government has reportedly been targeting journalists, activists, and lawyers working to raise awareness of issues facing migrants at the U.S.-Mexico border.

On Wednesday, the NBC affiliate in San Diego revealed leaked documents showing that authorities — including U.S. Customs and Border Protection and the FBI — targeted these journalists and activists for scrutiny at the border and created a secret database containing dossiers that included their personal details, social media information, and descriptions of their migrant-related work.

This follows news reports in February documenting how CBP repeatedly subjected journalists to lengthy interrogation and confiscations of their cameras and notes at border facilities. The U.S. government also apparently worked with Mexican authorities to prevent photojournalists from entering Mexico to report on migrant issues.

Let’s be clear: This is unconstitutional.

The First Amendment bars interference with freedom of the press and doesn’t permit the government to retaliate against people based on their viewpoints. That means the government can’t single people out for punishment or harsher treatment simply because it disagrees with the messages they are conveying.

The reported facts in this case look like a First Amendment disaster. Department of Homeland Security officials created a list of activists, advocates, and journalists who were working with or reporting on the migrant caravan in order to flag them for lengthy detentions and questioning at the U.S. border. And it appears that many activists and lawyers were targeted solely because they engaged in speech and association that are at the core of First Amendment protections — namely, speaking out against government policies regarding treatment of asylum seekers or engaging in legal representation of asylum seekers.

DHS also singled out journalists who reported on migrant issues. Many journalists were subjected to lengthy questioning at the border about what they were reporting on and who they had spoken to. Some were even denied entry to Mexico, apparently at the behest of U.S. government officials.

Such actions threaten the freedom of the press as well as the individual journalists’ First Amendment rights. Using the coercive environment of the border to attempt to force journalists to reveal sources or other sensitive information could chill other members of the press who wish to report on subjects they know the U.S. government is interested in. It also raises the prospect of the government using its power to suppress reporting on subjects it would rather the American public didn’t know about — such as the conditions facing migrants at the U.S. border — thus threatening democratic accountability.

CBP suggested in a statement that it sought to interview the advocates and journalists in part because they were on the ground during unrest near the border and are therefore witnesses to potential criminal activity. This rationale doesn’t work. If it did, any journalist who witnesses or reports on pressing matters or potential criminal activity in the United States could be forced to turn over sources and information.

That would amount to an end-run around Department of Justice guidelines for when the federal government can force journalists to turn over information for a law enforcement investigation. Those guidelines require the government to satisfy a higher threshold of need before forcing journalists to provide information. They also operate as a minimum requirement to ensure press freedom.

The border is not, and cannot be, an excuse for the government to avoid complying with the Constitution. Even if CBP has the authority to stop people at the border to make sure they’re admissible to the United States and are not carrying contraband, that doesn’t mean it can trample on their rights or gather intelligence in the process.

The conduct of the U.S. government in retaliating against journalists and activists at the border is disturbing and unacceptable. We’re exploring all available options to hold it accountable.