Apparently, Black Lives Matter groups have even more to be concerned about when it comes to police authorties.

The Guardian reports that New York Police Department officers went undercover to infiltrate small groups of Black Lives Matter activists. The department was then able to gain access to private text messages and offer the locations of certain activists during 2014 and 2015. The news was made public following a recent court ruling. This news shows what lengths the NYPD will go to in investigating organizations they see as threats. Most of the information was passed along the chain through emails.

In one particular instance, an officer was walking in a group of seven activists. They were on their way to Grand Central Station for a demonstration. This leads many to speculate that the undercover officers were able to infiltrate the organization deep enough to gain the trust of leadership.

“That text loop was definitely just for organizers, I don’t know how that got out,” said Elsa Waithe, a Black Lives Matter organizer, told The Guardian. “Someone had to have told someone how to get on it, probably trusting someone they had seen a few times in good faith. We clearly compromised ourselves.”

It’s not entirely clear how long the undercover operation was taking place, or even if it’s still going. It’s still surprising how quickly it happened.

“It would be pretty amazing that they would be able to get into the core group in such a short window of time,” said Joseph Giacalone, a retired NYPD detective sergeant and professor at John Jay College. “This could have been going on a while before for these people to get so close to the inner circle.”

The NYPD documents didn’t only include text messages. Photos and videos of the 2015 Grand Central Station demonstration in question were also released.

RELATED: EXCLUSIVE: Alicia Garza on What’s Missing from the Black Lives Matter Movement

Is this legal?

Apparently, the use of an undercover operation into the activist organization has raised some concerning legal questions. Attorneys are questioning if it violated the Handschu Guidelines, which have been in use for years. These rules restrict investigation on first amendment activity. The guidelines state that authorities can only investigate “when facts or circumstances reasonably indicate that an unlawful act has been, is being, or will be committed.”

Numerous accounts have found BLM protestors to be peaceful. This begs the question: when did they ever do anything unlawful to bring on the investigation in the first place?

“So my question would be: what was the unlawful activity that police had reason to suspect here?” said Michael Price, counsel at the Brennan Center for Justice. “It doesn’t appear that there was any criminal behavior they were talking about in the emails. Most references are to protesters being peaceful, so I would be very concerned if they were hinging their whole investigation on civil disobedience, such as unpermitted protests or blocking of pedestrians.”

Regardless of the legality of the practice, the betrayal felt within the organization is sure to have an impact.

“In the first couple of months, we had a lot of people in and out of the group, some because they didn’t fit our style but others because of the whispers that they were undercovers,” recalled Waithe. “Whether it was real or perceived, that was the most debilitating part for me, the whispers … It’s really hard to organize when you can’t trust each other.”