A farmer in Herkimer County, N.Y. couldn't figure out why his cows seemed more anxious than usual.

When they weren't producing as much milk as usual, he set up a surveillance camera.

What he saw shocked him: two men were rolling in the hay with his livestock, CNYCentral.com reported.

The farmer, whose name has not been identified, contacted authorities who conducted their own investigation.

As a result, Michael Jones, 35, and Reid Fontaine, 31, were arrested for misdemeanor sexual misconduct, UticaOD.com reported.

Authorities said Fontaine attempted to have sex with several cows while Jones filmed the encounters, according to Syracuse.com.

The two were released on an appearance ticket.

The suspects aren't the first men accused of having a cow in the Biblical sense.

In 2008, Brazilian cleaner Getulino Ferreira Paraizo was accused of having sex with 400 cows. He said he preferred the more tranquil animals.

It might be better to think twice before attempting sex with cows or any other animals.

A 2011 study published in the Journal of Sexual Medicine found that men who have had sex with animals were twice as likely to develop penile cancer as those who stick with their own kind.