A Burnsville police officer testified Tuesday that he exchanged racist texts with Allen “Lance” Scarsella, the man standing trial on felony assault and riot charges in the shooting of five Black Lives Matter protesters.

Brett Levin said he was friends with Scarsella since high school and the two stayed connected after Levin joined the Mankato Police Department.

In 2015, Levin said Scarsella frequently sent him “racially charged” text messages, and that the texts were “negative about black people.” When asked if he replied with similar texts, Levin replied, “Yes I have.”

“How we were talking was more along the lines of locker room talk,” he said.

Levin was not asked to describe the content of those messages.

Levin said he left the Mankato Police Department and is now with Burnsville.

He declined to comment after he finished testifying Tuesday. Burnsville Police Chief Eric Gieseke said it would be inappropriate to comment on testimony in a pending case. Levin has been with the department since May and has not had any formal complaints against him, Gieseke said.

Prosecutors say Scarsella’s racist beliefs eventually led him to shooting five black men on Nov. 23, 2015, near an encampment for a protest of the death of Jamar Clark, an unarmed black men killed by police. Scarsella’s defense team is arguing that he shot in self-defense against an onrushing group of protesters.

The three others with Scarsella that night, Nathan Gustavsson, 22, of Hermantown; Daniel Macey, 27, of Pine City; and Joseph Backman, 28, of Eagan; stand charged with second-degree riot and aiding an offender.

Levin said he was on patrol for Mankato when Scarsella called him early the morning of Nov. 24 and told him about the shooting. He said Scarsella told him that he and three others went down to the protest wearing masks to conceal their identities. When they were asked to remove their masks, Scarsella told Levin that a fight broke out.

“I believe he told me … that one of his friends pushed him down as the protesters caught up to them,” Levin testified. “One of the protesters pulled out a knife and that’s when Lance pulled out his gun and shot.”