ROCHESTER, N.Y. (WROC) — A New York State Police sergeant from Rochester was in court Tuesday, accused of tipping off the target of a gambling investigation.

Thomas Loewke, 51, is charged with obstruction of a state or local law enforcement investigation and obstruction of an official proceeding.

According to prosecutors, Homeland Security joined a federal, state, and local investigation into illegal gambling businesses in October of 2020. They say a suspect identified as Target 1 generated $1,241,172 in illegal gambling profits between April 2019 and January 2021. Another suspect, Target 2, was discovered to have $8,945,629 in profits in an account created in April 2016.

During the course of that investigation, police intercepted calls and text messages between targets of the investigation, agents, and individual people placing bets.

While listening to one such call, prosecutors say investigators heard Target 1 tell Target 2 that a member of the New York State Troopers named “TJ” tipped him off about an ongoing investigation. The targets then considered changing the passwords and domain name of their website, and erasing all of the site’s betting history.

Loewke, whose initials are TJ, was a New York State Police sergeant at the time of that phone call, prosecutors say.

Prosecutors say on Dec. 17, 2020, a Trooper performing maintenance on a senior investigator’s computer found a draft affidavit with Target 1’s name on it. Records indicated the office containing the document had been accessed three times that morning by a Trooper who then sent a text message to Loewke’s phone, saying “Call me ASAP.” The Trooper also allegedly made four calls to Loewke’s phone that day.

Investigators say the Trooper who allegedly called and texted Loewke later admitted to telling Loewke about the investigation. They also say Loewke’s phone contained evidence that he had been illegally placing sports bets.

Loewke appeared in court Tuesday and was released.