SAN JUAN, Puerto Rico — A passenger on a Caribbean cruise ship was arrested after a hidden camera with video of dozens of people, including children, was discovered in a public bathroom, authorities said.

Jeremy Froias was arrested last Wednesday in Puerto Rico and charged with video voyeurism and attempted possession of child exploitation material, according to court documents.

According to a criminal complaint filed in federal court in San Juan, Froias boarded Royal Caribbean’s Harmony of the Seas in Miami on April 29 for a seven-day cruise. The ship was scheduled to make land calls in Sint Maarten, Puerto Rico and the Bahamas before returning to Miami last Saturday.

A day after the voyage began while the ship was in international waters, Froias placed a hidden Wi-Fi camera in a public bathroom on the ship’s upper deck between a surf simulator and a bar, authorities said. A day after that, another passenger saw the camera and alerted the ship’s crew.

“The matter was immediately reported to local and federal law enforcement, and authorities removed the guest involved from the ship for further investigation,” Royal Caribbean said in a statement.

The ship’s security personnel seized the camera and found several hours of video files on a memory card, authorities said. The footage included Froias hiding the camera and pointing it towards the toilet. More than 150 people, including at least 40 children, appeared in the videos, investigators said. Some were at least partially nude. Froias and the camera were eventually turned over to the FBI in Puerto Rico.

A defense attorney for Froias declined to comment on the case.