The Philadelphia Carriage Co., one of just two horse-drawn carriage businesses remaining in the city, will cease operations at the end of the year, and all of its horses will be sent to an animal sanctuary. That's according to an agreement finalized in Common Pleas Court on Thursday that represents the culmination of a months-long effort by city lawyers, at the urging of Councilman Mark Squilla and animal-welfare advocates, to close the stable while ensuring that the horses would not be sold at auction.

The company will continue operating through December, according to lawyer Barry Penn, who represents the carriage company. The agreement provides for monitoring of the horses in that time, lawyers said.

The Department of Licenses and Inspections in June found numerous building-code violations at the company's stable, at 500 N. 13th St. A vacant lot that was used to turn out the horses in the Callowhill neighborhood's days of disinvestment has been consumed by the construction of condominiums. Inspectors from the Animal Care and Control Team, which  investigates violations of the city's animal-welfare code, reported that there is now no appropriate turnout space, that the stable was poorly ventilated and dirty, that stalls were far too small, and that horses often appeared malnourished, and were found lying in feces and urine.

On Wednesday, the city filed for an injunction to cease operations of the firm and forfeit some of the horses to the city immediately. A city lawyer declined to identify the sanctuary where the horses will be placed, but in a statement the city described it as a "responsible, humane caretaking facility that specializes in the rescue of draft and carriage horses."

"This matter was able to be resolved amicably, quickly, and with the best interest of the public and the horses in mind," the statement concluded.

Penn described Philadelphia Carriage Co. owner Han Hee Yoo as well-meaning but perhaps over her head. "She's been operating since 1977, so it's been a long time. And since her husband died in 2009, she's been running it herself, and it's not been easy. She's done her best," he said. "I think [the settlement is] a good solution for everybody."

Animal-welfare advocates, including Northeast Philadelphia resident Janet White, who runs a group called Carriage Horse Freedom, responded to the agreement with skepticism.

"I want to know more," she said. "It sounds wonderful, but we need more information, and we need to make sure that going forward there are better protections for animals. Going forward, we want a ban on horse-drawn carriages in Philadelphia."