[What you need to know to start your day: Get New York Today in your inbox.]

Mayor Bill de Blasio has called electric bicycles “a real danger,” and “a serious part of the problem” when it comes to the safety of city streets. He celebrated a police crackdown last year in which hundreds were confiscated.

Now, a package of four City Council bills, set to be introduced Wednesday, would legalize most forms of the so-called e-bikes, the scourge of many New York residents and also a staple of the food-delivery workers who serve them.

The legislation, which would also legalize electric scooters, would allow not only electric bicycles that give extra support to a pedaling rider, but also those that could be operated without pedaling, by engaging a motorcycle-like handlebar throttle.

[Need a primer on e-bikes? We’re here to help.]

The legislation, a draft of which was obtained by The New York Times, is likely to set off a public confrontation with Mr. de Blasio, whose administration has insisted that state law bans electric bicycles that operate with a throttle — the primary sort of e-bike used by delivery cyclists, many of whom are recent immigrants.