A North Carolina man has been released on bail after he allegedly snuck into a college dorm building and inappropriately touched a student's leg.

Mecklenburg County authorities charged John Foster Alexander, 38, with sexual battery, secret peeping, first-degree burglary, breaking and entering, and second-degree trespassing in connection with the reported incident after he turned himself in. He was released Wednesday on $50,000 bond.

Belmont Abbey College released a photo of the suspect in an alert to students after he entered a dorm building on the Catholic school's Belmont, North Carolina, campus on Sunday morning.

"I've been here six years, and . . . this is not something that happens on Belmont Abbey's campus. We're a very safe place," Belmont Abbey College Chief of Police Andy Leonard told Fox News Digital.

SUSPECT IN SHOOTING OF ALL-AMERICAN WRESTLER NEAR COLLEGE CAMPUS FREED FROM JAIL DAYS BEFORE ATTACK

John Foster Alexander mugshot

Mecklenburg County authorities charged John Foster Alexander, 38, with sexual battery, secret peeping, first-degree burglary, breaking and entering, and second-degree trespassing in connection with the reported incident after he turned himself in. He was released Wednesday on $50,000 bond. (Mecklenburg County)

Leonard noted that Alexander lives in Belmont, about five miles from the college, and was formally charged in Gaston County, where magistrates tend to set higher bonds than in Mecklenburg County, where the suspect turned himself in.

COED SEX ATTACK SUSPECT STALKED STUDENT DOWN STREET, SOAKED IN HER BLOOD: PROSECUTOR

Mecklenburg County bonds recently set by magistrates have allowed criminal suspects to be released just hours after their charges are filed, Alexander being one of them. Beginning on October 1, a new state law called H.B. 813, or the Pretrial Integrity Act, allows judges to determine through their own discretion whether violent criminal suspects should be released before trial.

Belmont Abbey College campus

Leonard noted that Alexander lives in Belmont, about five miles from the college, and was formally charged in Gaston County, which has different bond laws from Mecklenburg County, where the suspect turned himself in. (Google Maps)

"This law will ensure our most violent offenders are not released back into the community before going in front of an elected judge. I look forward to October 1, 2023, when it goes into effect," Charlotte-Mecklenburg Police Chief Johnny Jennings said in a July tweet after North Carolina Gov. Roy Cooper signed the law into effect.

MADISON POLICE REVEAL HOW THEY CAUGHT UNIVERSITY OF WISCONSIN SEX ASSAULT SUSPECT

Alexander got into a dorm building through a door that was propped open. A lightning strike had caused an issue with the front door of the building, causing the door to go into "lock mode," Leonard explained. Students were still able to gain access to the building through side doors with their key-cards.

The school's police chief said that Alexander, to the school's knowledge, had not been on campus before.

CLICK HERE TO GET THE FOX NEWS APP

"We're still trying to figure out, why here?" he said, speculating that because the suspect worked in the bar-restaurant industry in the area, he may have been exposed to Belmont Abbey students in a work setting.

A Belmont Abbey College spokesperson declined to share a statement.