It's official: Bestiality will become illegal in Kentucky.

Gov. Matt Bevin signed a bill Tuesday that outlaws sex between humans and animals in the Bluegrass State.

Senate Bill 67 prohibits sexual contact between a person and an animal, defining sexual contact as "any act committed between a person and an animal for the purpose of sexual arousal, sexual gratification, abuse or financial gain."

Background:Sex with animals is no joke, senator says. But it's legal in Kentucky

Kentucky had been one of the final few states to not have a law banning bestiality, alongside Wyoming, New Mexico, West Virginia, Hawaii and Washington, D.C.

Several previous attempts at banning bestiality in Kentucky had failed in recent years.

SB 67, which easily passed the House and Senate earlier this month, makes sex crimes against an animal a Class D felony, punishable by one to five years in prison.

Perpetrators will be prohibited from owning animals, living in a household with animals and working or volunteering in a place where they have unsupervised access to animals for at least five years after completing their sentence.

If the violator is not the owner of the animal that was abused, the animal must be returned to its rightful owners.

The bill also makes offenders attend treatment or receive counseling.

The bill's sponsor, Sen. Julie Raque Adams, R-Louisville, told the Courier Journal in an email Wednesday she is "very excited the bill has been signed into law."

"Not only will it protect our animals from abuse, but it will also protect women and children from violence," Adams said. "It is proven beyond a doubt that persons who sexually assault animals are very likely to turn their violent tendencies toward women and children."

A survey of pet-owning families with substantiated reports of child abuse and neglect found that animals were abused in 88 percent of homes where child physical abuse was present, according to AmericanHumane.org.

In 2017, the FBI began tracking animal cruelty crimes, including bestiality, in its National Incident Based Reporting Systems.

While some opponents argued the bill is harmful to farmers and does not consider artificial insemination for breeding purposes, SB 67 lists exceptions, including artificial insemination and "accepted animal husbandry practices."

SB 67 will take effect 90 days after the end of the legislative session on Thursday.

Reach Billy Kobin at bkobin@courierjournal.com or 502-582-7030.