Amid rallies by animal-rights advocates and drivers of horse-drawn carriages, the New York City Council on Monday introduced legislation to ban carriage horses,acting on a much-delayed campaign promise by Mayor Bill de Blasio.

The drivers - a few wearing top hats and at least one in a tuxedo - gathered at City Hall and argued for the preservation of their livelihoods. Two hours earlier, people carrying posters that showed overturned carriages and debilitated horses lying on city streets said they were concerned about protecting the animals' lives.

Though a poll this summer showed that New Yorkers were overwhelmingly opposed to a ban on horse-drawn carriages, the back-to-back rallies set the stage for what council members expect to be a heated debate before a vote next year. A majority of the 51 council members appear to be undecided, and just a handful appeared at the rallies on Monday.

"It's going to be a close one," says Councilman Fernando Cabrera, who represents parts of the Bronx and who said he supported the ban.

Under the bill, horse-drawn carriages would be prohibited by June 1, 2016, with exceptions for film and television production, parades and events at locations closed to vehicular traffic. The city would offer the 300 licensed drivers help in obtaining taxicab licenses and training for other jobs. The horses would not be allowed to be sent to slaughter.

As a candidate, Mr. de Blasio had vowed to rid Central Park of the carriages "on Day 1" of his new administration. New Yorkers for Clean, Livable and Safe Streets, an anti-carriage group known as NYClass, supported an advertising blitz against his main opponent, Christine C. Quinn, the former City Council speaker.