Justin Fahy, 27, was arrested Tuesday for allegedly taking photographs under stalls in a women's bathroom at the University of Wisconsin Madison. Dane County Jail

A male special agent for the federal Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) was arrested Tuesday for allegedly taking photos in a women's bathroom at the University of Wisconsin (UW) in Madison, according to the school’s police department.

Justin T. Fahy, 27, allegedly went into a women’s bathroom in a residence hall at the school and put his cell phone into occupied stalls to take photographs Friday. Fahy, of Montana, told police that it was a mistake and that he entered the wrong bathroom, UW police spokesperson Marc Lovicott told the Wisconsin State Journal.

A woman who was in one of the stalls alerted police.

Police got a warrant to search Fahy’s phone and also looked at security camera footage of the residence hall. Lovicott said police believe he was in the women’s room for around 14 minutes.

“In addition, Fahy’s phone had been recently restored to a backup point from earlier this year, leading UW police department investigators to believe he was likely trying to delete evidence,” Lovicott told the State Journal.

The man was booked into Dane County Jail on tentative charges of attempting to take photos depicting nudity and disorderly conduct, according to a press release from University police. Fahy was also banned from the campus.

“Allegations like these cannot and will not be taken lightly,” said ATF Acting Special Agent in Charge Kirk Howard in a statement. “Though ATF cannot comment on personnel matters, we will make sure that allegations of impropriety are handled appropriately. We place high value on the trust of the public and will not tolerate any violation of that trust.”

Fahy was still in the probationary period of his employment, according to WKOW-TV.

“We don't know if he did this in other residence halls or what have you, We'll obviously continue our investigation and look back to see if we might be able to trace him anywhere else,” said Lovicott to WKOW-TV.

The bathroom was in a first floor common area of a residence hall and police said they will examine security protocol for the building.