MADISON — A federal agent was arrested Tuesday for taking pictures in the women’s restroom of a UW-Madison residence hall, according to the university’s police department.

Justin T. Fahy of Monona allegedly entered a bathroom at Witte Residence Hall on Friday afternoon, put his cell phone under an occupied stall and took pictures, according to police.

The 27-year-old Fahy, who identified himself as a special agent for the federal Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF), told police it was a misunderstanding and that he mistakenly entered the wrong restroom, according to the Wisconsin State Journal.

Ashlee Sherrill, a spokeswoman for the ATF’s St. Paul Field Division, confirmed Fahy is employed at the bureau.

During a search of Fahy’s phone and a review of security camera footage from inside the residence hall, investigators learned he had been in the restroom for nearly 15 minutes, police said.

Fahy was taken to the Dane County Jail on preliminary charges of attempting to take photos depicting nudity and disorderly conduct, and has also been formally banned from the campus. Official charges are expected to be filed as early as Wednesday.

“Allegations like these cannot and will not be taken lightly,” ATF Acting Special Agent in Charge Kirk Howard said in a statement. “We will make sure that allegations of impropriety are handled appropriately.”