An upstate SPCA has apparently worked out a unique settlement in which an animal-loving attorney who showed up on the doorstep of the county jail with 25 cats becomes a ticket-writing special deputy sheriff, and the SPCA collects half the ticket revenue.

Albany Attorney Mathew B. Tully, the chief peace officer with the local Society for the Prevention of Cruelty to Animals, latched on to an obscure provision in the state Agriculture and Markets Law to forge a deal that he says will benefit animals while relieving Schenectady County taxpayers of the burden and cost of housing seized dogs, cats and other creatures.

The rarely invoked provision in §373 (4) says the county sheriff must take custody of any animals in the possession of an individual arrested by the SPCA.

The settlement idea came from attorney Mathew B. Tully, a peace officer of the Schenectady County SPCA.

Mr. Tully has been pushing the issue for three years, but cash-strapped Schenectady County and its sheriff were not keen on the idea of taking custody of stray, abused, neglected and abandoned animals, and refused to do so, according to court papers.

Push came to shove and Mr. Tully, who by his own admission is litigious, even for a lawyer, initiated a lawsuit. And if his point was not clear enough, he highlighted it by bringing the sheriff the fruits of a recent raid.

“We made an arrest and I showed up at the jail with 25 cats and said, ‘Here you go,’ but I was turned away,” said Mr. Tully, a principal in Tully Rinckey.

Tomorrow, a Schenectady County legislative committee is expected to consider a tentative settlement agreement in SPCA v. Dagostino, 2011-2234, a case Mr. Tully says has implications for dozens of other counties across the state in which small organizations like the SPCA have the power and responsibility to enforce animal control laws but do not have their own shelter.

Under the proposed settlement, Mr. Tully and his colleagues at the SPCA, all of whom are state-designated and trained peace officers, can be granted the status of special deputy sheriffs, which makes the organization eligible to apply for law enforcement grants it previously could not access.

In return for contracting with the county to perform dog control services, the SPCA will get 50 percent of the revenue generated from the tickets written by the peace officers, including Mr. Tully. The other half goes into an account for the housing of homeless animals, according to settlement documents.

“Our SPCA is relatively new and is lawyer-heavy, unlike most animal rescue organizations which don’t have a proactive approach, let alone the Tully approach of thermo-nuclear war whenever possible,” said Mr. Tully, whose partner, Gregory T. Rinckey, is also an SPCA peace officer. “We were able to find this state law that has been on the books for over 100 years that says when the SPCA makes an arrest and there are animals involved the sheriff or other designated police representative must handle the animals.”

For the county, the settlement would relieve it of its responsibilities under §373 (4) of the Agriculture and Markets Law, at no cost to taxpayers since ticket revenues are expected to cover expenses of caring for the animals. Mr. Tully acknowledged that the deal creates incentive for him and the other SPCA humane law enforcement officers to write tickets.

“The SPCA is an odd duck in the law in that we are a private entity with law enforcement powers,” Mr. Tully said. “The ultimate end game for us is to make sure the SPCA is viable for years to come. SPCAs don’t have enough money to house a cat and they certainly don’t have the $20,000 it could take to litigate a case. So, we bring a unique angle to this.”

Mr. Tully is quick to point out that the Schenectady SPCA has an annual budget of only $25,000, but “virtually unlimited access to legal services” through his firm. He expects to lodge a similar action in Schoharie County.

Schenectady County Attorney Christopher H. Gardner said he expects the deal will be approved Tuesday by the county legislature’s public safety committee.

“We do have a vicious dog problem in Schenectady County, especially the city of Schenectady, and this will, at no cost to taxpayers, settle a lawsuit and relieve the sheriff of his duty to shelter animals under the Agriculture and Markets Law,” Mr. Gardner said. “This will put 10 to 12 volunteer peace officers on the street to help enforce our ordinances.”

Peace officers supplement law enforcement and can perform many of the functions of police officers, including making warrantless arrests and conducting warrantless searches, and those with additional training can carry firearms. But the jurisdiction of peace officers is usually restricted to a specific area, such as enforcing animal control laws. Criminal Procedure Law §2.10 defines more than 80 different types of peace officers.

Mr. Tully, in his law practice, handles employment and family law cases as well as representing military personnel and federal government employees. According to his website, Mr. Tully is a lieutenant colonel in the New York Army National Guard, and has “chosen to dedicate his legal career to protecting and preserving the rights of his fellow veterans and reservists.”