The day before Bill de Blasio was sworn in, he vowed that killing off the horse carriages would be among his first acts as mayor. “We are going to get rid of the horse carriages, period,” he said. “It’s over.”

Nearly four months later, not only is it not over, there will soon be counter-legislation in Albany. Westchester Assemblyman Gary Pretlow says he will introduce bills to maintain the number of horse-carriage licenses the city issues as well as declare what experts already tell us: It is not inhumane for a horse to pull a carriage.

The mere existence of such legislation tells us as much about the mayor’s competence as it does about horse carriages. Because if it passes, it will be the second time — the first was the state intervention on charters — de Blasio’s preference for ideological crusades over common sense had invited a thumping from Albany.

Though banning horse carriages may appeal to a narrow group of urban animal-rights activists, no one else seems to agree. All the big papers oppose it. So does the public, by a two-to-one margin, according to the polls. So do the Teamsters, who represent the drivers.

And now the head of the Central Park Conservancy has made clear he doesn’t want the gimmick de Blasio is proposing to substitute for the carriages: electric cars.

This week, the retro-looking car debuted at the New York International Auto Show. But here’s the problem: These cars were never about boosting tourism or ensuring a living for displaced carriage drivers.

The only purpose of this car is to provide the activists political cover for getting rid of the horse carriages. As the drivers are keenly aware, if the horses are banned and the cars don’t work out as advertised — there hasn’t even been a pilot program — it won’t matter one whit to the car backers. They’ll have what they really wanted.

De Blasio insists he will get his ban. But the backlash he’s provoking suggests his attack on the horse carriages risks the same outcome as his attack on charters: a weaker and apparently not much wiser mayor.