A deal has been reached that would save New York Central Park's horse-drawn carriages from a threatened ban.

Mayor Bill de Blasio and union officials released a statement Sunday announcing the agreement.

City officials say the deal would reduce the number of licensed horses from about 180 to just over half that number by the time a permanent home is built for them in Central Park.

Right now the horses live in private stables on Manhattan's West Side.

The agreement would also limit the operation of horse-drawn carriages to Central Park.

Animal rights advocates had fought to get the carriages banned entirely, and de Blasio had pledged to ban the carriages. But the effort failed amid public and political opposition.

Any deal has to be approved by the City Council.