BATH, Maine — A 26-year-old Bath man has been arrested after allegedly posting nude photos of other people on the Internet without their permission.

John Dunne Jr. turned himself in at the Bath police station on Friday after learning of two arrest warrants charging him with felony aggravated criminal invasion of computer privacy and two misdemeanors, theft by unauthorized taking or transfer and unauthorized dissemination of certain private images, otherwise known as “revenge porn,” according to a release from the Bath Police Department.

The warrants were issued following a monthlong investigation into complaints from local residents, both minors and adults, about private photos posted on various Internet sites. Most photos were allegedly posted without the subject’s consent.

In one instance, Dunne is suspected of stealing a photo from a victim’s cellphone and posting it. In the other instance, he allegedly already had possession of the photo before posting it, Bath police Lt. Robert Savary said. Both alleged victims are adults.

The “revenge porn” law was passed by the Maine Legislature in 2015.

According to Savary, Bath police have investigated “many” such cases in which private images sent by text to others, such as ex-boyfriends and ex-girlfriends, were then either posted on the Internet or sent to other people who then posted them.

Savary said such cases are occurring more frequently, are very difficult to solve, and often the perpetrator can’t be determined. He encouraged people to safeguard their private images and not post other people’s images without their consent.

“We would also like to ask parents to reinforce with their teenage children the implications of sharing these types of photos with others,” he said. “In most cases, once an image makes it onto the Internet, it is very difficult to have it removed. Images regarding minors, if explicit, violate both state and federal sex crime laws.”

Dunne was taken to Two Bridges Regional Jail in Wiscasset, where he was held on $500 cash bail. A court date was not immediately available.

The Maine State Police Computer Crimes Task Force assisted with the investigation.