By Brooke Shafer

FORT LAUDERDALE (CBSMiami) – A Fort Lauderdale police officer found himself on the other side of the law Thursday morning when he faced a judge in bond court.

Officer Louis Walsh, 29, is accused of sexting with who he thought was an underage girl. Turns out it was an undercover detective.

READ MORE: Rude Awakening For Elderly Couple, Slightly Hurt After Car Slams Into Miramar Home

During his court appearance, the judge set his bond at $70,000.

“He was a Fort Lauderdale police officer and that is concerning to the court given his position,” said the judge.

After posting bail, Walsh will need to wear an ankle monitor. He can’t use the internet or have a gun and must stay away from minors.

Walsh was arrested on Wednesday.

The Broward Sheriff’s Office says they received information from a Minnesota Human Trafficking Investigators Taskforce regarding a police officer in Fort Lauderdale engaging in online chats with someone he believed to be a minor.

READ MORE: Taste Of The Town: Chefs Jose Mendin And Santo Agnello Open Italian Eatery Casa Isola

The officer was identified by investigators as Walsh.

Investigators said on at least two occasions, Walsh engaged in sexual conversations with an undercover detective who he believed was a minor female.

Detectives said Walsh sent a photo of himself, exposing his private area.

BSO detectives learned that Walsh had worked closely with students in the county. He worked special security details at Cardinal Gibbons High School, where he also coached wrestling, and at St. Anthony Catholic School.

On Wednesday, the Fort Lauderdale Police Department released the following statement:

MORE NEWS: Missing California Tourist Angela Morrisey Found In Medley

“This is a difficult situation for everyone involved. The Fort Lauderdale Police Department is shocked and disappointed to learn of the arrest of one of our officers. After an investigation by the Broward Sheriff’s Office (BSO), Louis Walsh was taken into custody on Wednesday. The details surrounding these allegations are very difficult to hear and do not reflect the character and professionalism expected of the men and women of this agency. Walsh has been placed on administrative leave without pay pending the outcome of a criminal investigation.”