Horse diapers have been thrust into the debate over religious freedom.

Two Amish men in Auburn, Ky., filed a lawsuit last month saying a city ordinance requiring horses to wear equine diapers—bags designed to catch manure—violated the ability of Amish residents to exercise their religion.

The ordinance, passed in 2014, broadened an existing law mandating the removal of dog waste in public places. The new law, which the city said was spurred by complaints from neighbors about horse manure, requires a “properly fitted collection device” to be placed on all horses walking on the street.

Residents of Auburn say the issue has divided the town of about 1,300 for years. Members of the town’s Amish community have refused to comply with the ordinance, saying equine diapers violate the community’s religious standards. That stance has landed many of them in court, or worse.

Last year, after a jury found Dan Mast guilty of violating the ordinance, he refused to pay the $193 fine and spent 10 days in jail. Last month, Mr. Mast, 27 years old, and another Amish plaintiff filed a lawsuit against the city of Auburn, its mayor and police chief in which they argue the law is intended to prosecute the Amish based on their religious beliefs.

As of October, the city of Auburn had more than 25 pending cases against Amish men who failed to attach diapers to their horses, according to the suit.

The plaintiffs are members of the Old Order Swartzentruber Amish religion, one of the most conservative Amish orders. They believe in shunning things that are “of the world,” the lawsuit said, including technology that some Amish groups accept, like fax machines, LED lights and gas-powered refrigerators. Before the ordinance passed in 2014, the community elders decided the equine diapers wouldn't be permitted by the Swartzentruber church.

A lawyer for the defendants, W. Currie Milliken, said the issue has been blown out of proportion, and the city wants to preserve its friendly relationship with the Amish.

Click for more from The Wall Street Journal.