The discovery of a hidden camera inside a woman’s dorm room at WPI has prompted an investigation by authorities at the Worcester college, according to a search warrant affidavit filed in court.

The male student accused of hiding the camera will now have his case referred to the college’s Campus Judicial System, WPI told MassLive in a statement.

On Jan. 23, a female student and her boyfriend discovered a hidden camera under a bed inside her dorm room at one of the residence halls on campus. The mini cube camera, which records audio and video, was tucked under a mattress on an unused bed in the room, WPI police investigators wrote in a search warrant affidavit on file in Worcester District Court.

The boyfriend and girlfriend tried to look at the SD card on a computer but could not recover any of the data. The female student notified her roommates the following day about the camera.

The suspect, who has not been criminally charged, knows the female student and learned about the discovery, investigators said. He asked the female student if he could examine the camera, which she allowed him to do.

The suspect took the camera to his room and returned about 15 minutes later. He also asked the female student about what she intended to do with the camera, the search warrant affidavit said.

The female student told police the suspect then text-messaged her on Jan. 24 about the camera, which made her think he was somehow involved, authorities said.

The female student then took the camera home on Jan. 25 and her father, and another person, extracted data from it and downloaded the information. A 30-second audio clip containing the voices of the suspect and another male, the search warrant affidavit said.

No nude videos or photographs of the female student were discovered on the camera, records said.

On Jan. 27, WPI police investigators spoke with the female student, who reported the discovery of the camera. Police then were allowed to search her room and the suite where she lived with her roommates. No other hidden devices were found.

The suspect was then asked by police to speak with investigators. He agreed to speak with police, authorities said.

The suspect admitted to placing the camera in the female student’s room for the purposes of “sexual gratification,” WPI police said in the search warrant affidavit. The suspect admitted to buying the camera over Christmas break and placing it in the female student’s room when he returned to campus around Jan. 22.

The suspect told WPI police he downloaded the data from the camera to his personal laptop and erased the data from his recycling bin, according to the search warrant affidavit. He told police he did not see nude or sexually explicit videos or photos but deleted the data so he would not be caught, investigators said in the affidavit.

Police seized the suspect’s laptop, SD card and retrieved the other SD card, USB drive and camera discovered by the female student.

WPI investigators sent the items to the Massachusetts State Police Cyber Crime Unit for review.

In a statement to MassLive, WPI officials said the “alleged behavior in this case is entirely inconsistent with WPI’s values as a community.”

“As soon as we learned about the case, the student was ordered to stay away” from the victim, WPI officials said. “WPI Campus Police are conducting an investigation, and the case is being referred to WPI’s Campus Judicial System for adjudication. WPI is fully committed to the health and well-being of our community, and we will continue to work diligently to make our community safe.”