A Maryland man faces a felony charge for attempting to have sex with a horse and has been ordered to stay away from all animals while he awaits his day in court, authorities said on Friday.

Officials say 67-year-old James Von Dundas from North Potomac, Maryland, was charged with attempted carnal knowledge of an animal after soliciting an undercover Loudoun County Animal Services officer on Thursday for the opportunity to have sexual relations with a horse.

Police arrested Von Dundas at Balls Bluff Park in Leesburg, Virginia, where he "indicated his intent to engage in the illegal activity" to the animal services officer, police said.

He has been charged and was released on $2,500 bond.

April is "prevention of cruelty to animals month." News4's Sheena Parveen talked to Chris Schindler from Humane Rescue Alliance to find out how the organization handles animal cruelty.

“Loudoun County has zero tolerance for criminal acts that include cruel and heinous behavior towards animals,” Animal Control Chief Chris Brosan said in a news release. “We routinely conduct investigations to protect all animals in Loudoun.”

Von Dundas is also prohibited from being in contact with any animal species before his court appearance on May 6, officials said.

Under Virginia law, crimes against animals are a Class 6 felony, which can lead to a maximum penalty of five years in prison and a $2,500 fine. In January, the Virginia Court of Appeals upheld Virginia's ban on bestiality, saying that animals are not able to provide consent.

“We recognize that proactive investigations are one of the best ways to ensure the community is safe,” said Department of Animal Services Director Nina Stively in a news release. “We do not want to wait for crimes against animals to happen, we want to prevent them.”