Over the weekend, Customs and Border Protection agents detained more than 60 American citizens and green card holders at a border crossing in Blaine, Washington, because they were of Iranian heritage. Agents allegedly held these individuals for up to 11 hours, questioning them about their families, politics, and allegiance to Iran. CBP insisted that it did not detain anyone “because of their country of origin,” a claim contradicted by firsthand accounts from travelers and attorneys in Blaine.

Given the Trump administration’s previous targeting of religious and ethnic groups, particularly Muslims, the news raised the question of whether this action was part of some new directive from the Department of Homeland Security. It’s quite possible, however, that CBP has not adopted a nationwide policy targeting Iranians—while permitting individual officers to do just that. The agency grants its employees extraordinary discretion to enforce broad directives, a recipe for discrimination and illegality. Under Trump, especially, CBP agents frequently behave as if they are accountable to no one, because they usually are.

While CBP denied imposing any uniform rule in response to Iran’s perceived threat to the United States, the agency’s statements acknowledge some heightened scrutiny. CBP told CQ Roll Call’s Tanvi Misra that it was “operating with an enhanced posture,” alluding to the Department of Homeland Security’s warning that Iran may soon carry out a terrorist attack. When the agency declares an enhanced threat, its officers have wide latitude to decide how best to respond. They can’t legally single out individuals solely because of their national origin, but they can take it into consideration, along with other factors like travel history and suspicious behavior. Former CBP Commissioner Gil Kerlikowske told the New York Times that agents “put an added emphasis” on national origin when a specific country has been “singled out as a national security threat.”

Under Trump, agents have only been emboldened by the president’s violent, dehumanizing rhetoric.

These hazy rules give agents considerable authority to select Iranian Americans for “secondary screening,” CBP’s term for detention. When selected for secondary screening, an individual is placed in a small room, often for hours, and eventually interrogated. According to reports from the Times and BuzzFeed, agents asked these individuals about their family members (including names, birthdays, and military service), education, “political views and allegiances,” and “weapons training.” Agents coerced at least one American citizen into providing his phone passcode, then searched the phones for two hours—an inspection of dubious legality, since CBP can only lawfully search phones at the border for “digital contraband” like child pornography, not general evidence of a crime.

Iranian-American citizens and green card holders, including families with children, were held for hours awaiting questioning. It does not appear that, in the end, CBP formally turned anyone away. But as Jorge L. Barón, executive director of the Northwest Immigrant Rights Project, has explained, these individuals were subject to troubling treatment. Barón, who visited the Blaine border crossing on Sunday, found that CBP barred Iranian Americans from entering the U.S., their home, and seized their passports, preventing them from returning to Canada.

In short, as Washington Gov. Jay Inslee announced on Monday, CBP likely broke the law by detaining dozens of Iranian Americans because of their national origin. Do not expect the agency to admit error. Although it arguably gets less attention than the lawless Immigration and Customs Enforcement, CBP is equally out of control. Its agents routinely break the law then lie about it. In fact, the ability to conceal official misconduct seems to be a prerequisite for certain higher-level CBP positions. And the incident in Blaine may well be a preview of the agency’s unlawfully aggressive approach to border security as the U.S.-Iran conflict heats up.

Perhaps the most notorious instances of CBP’s illegality occurred during Donald Trump’s first travel ban. In January 2017, the president issued a sloppy order barring the entry of citizens from seven Muslim-majority countries. CBP officers rushed to enforce it—even after a series of federal judges blocked its enforcement. A lengthy report from the DHS Office of Inspector General later found the CBP unambiguously broke the law in enforcing the travel ban: Agents directly violated at least one court order while engaging in “strategic maneuvering” to “resist judicial review” of its operations. At one point, CBP did “everything in its power to block” travelers from boarding a flight to the U.S., even though a court order explicitly allowed them to board; agents actually threatened to fine a German airline that dared to comply with the court’s order.

Following the travel ban catastrophe, I reported on a curious case involving CBP’s New Hampshire operation. The agency claims a right to conduct warrantless, suspicionless searches and seizures up to 100 miles from the borders. In New Hampshire, CBP agents colluded with local police to circumvent the state constitution, which bars suspicionless searches. These agents set up a checkpoint to stop and search cars under federal authority, then allow state police to help search them for contraband. (They were looking for marijuana, because the state’s decriminalization was set to take effect just weeks later.) Although state police could not have legally obtained this evidence on their own, they intended to use it against the drivers in court.

In January 2018, in a tiny courthouse in Plymouth, New Hampshire, I watched CBP agents lie under oath. The case hinged in part upon the real purpose of the checkpoint: To have any semblance of legality, it had to be set up for immigration purposes, not as a dragnet. A procession of CBP agents insisted that the purpose was, indeed, immigration enforcement. But a mountain of evidence contradicted their testimony, indicating that CBP and local police merely wanted to bust drivers for drug possession. The judge eventually ruled that CBP agents had sought to deceive the court by lying about the true reason for the checkpoint and threw out the evidence they had seized.

CBP’s dismissive attitude toward the law can lead to a lot more than unconstitutional possession charges. The agency has also gained notoriety for the brutal killings of people near the U.S.-Mexico border as well as the deaths of children in CBP custody. CBP agents have shot children across the border—including the 15-year-old Sergio Hernández, whom an agent shot lethally in the face while he was playing on the Mexican side.

The Supreme Court is currently considering whether Hernández’s family can sue his killer. Former high-level CBP officials filed a stunning amicus brief in the case urging the justices to hold agents accountable. Their brief warned that the agency has “high rates of corruption, misconduct, and excessive force.” They noted that officers have killed nearly 100 people, including 28 American citizens and six children. Eyewitnesses, other officers, and video evidence have repeatedly rebutted agents’ accounts of these killings. In one incident, a CBP official coached an agent to lie after he fatally shot an 18-year-old American in the back. That official was later elevated to a position in CBP’s Office of Internal Affairs and still has not been disciplined in any way.

As Justice Sonia Sotomayor put it at oral arguments in the Hernández case, the brief declares “pretty persuasively and extensively that the Border Patrol might be a bit of a mess and that disciplining is at a minimum here.”

Under Trump, agents have only been emboldened by the president’s violent, dehumanizing rhetoric, which they echoed in a popular secret CBP Facebook group that featured virulently racist and misogynistic commentary. Many officers who flouted the law remain at the agency, wielding extraordinary power over the lives and liberty of everyone they encounter. CBP is more than “a bit of a mess”—it’s a corrupt paramilitary force that answers to no one. And the disturbing events in Blaine suggests that the agency has, at a minimum, freed its agents to treat Iranian Americans as inherently suspicious.