There's a gray area in state law that riders of electric bicycles say creates confusion on who and where people are allowed to use a mode of transportation that is growing more popular among commuters and commercial delivery services in congested cities like Boston.

At the moment, state law lumps all electric bicycles into the same category as their faster counterparts, mopeds, in which people need to have a driver's license to legally ride one. That means regular electric bicycles can't be used by younger people or on pathways such as Boston's Esplanade cycling path or the 10-mile Minuteman Commuter Bikeway that runs from Bedford to the Alewife MBTA station.

To fix this, the Boston Cyclists Union is advocating for a bill (H 3457 / S 2309) that would create different classes of electric bicycles. At a rally outside the State House Wednesday afternoon, Boston Cyclists Union Executive Director Becca Wolfson compared the potential classification of electric bicycles to cars.

"One sort of thing that I like to point out is, any car on the road can go 100 miles, 120 miles an hour, right? Do we ban them because that would be unsafe?" she said. "No, we post speed limits, we design infrastructure that manages people's individual speeds. We have social norms."

The same should go for electric bicycles, Wolfson said.

"If we actually regulate them, then we give municipalities the ability to set speed limits or advisory speed limits, or to even say, actually, e-bikes aren't allowed on this type of path," she said. "Municipalities just want that local control, rather than no ability to talk about these bicycles, vehicles, because they're not defined in law."

The legislation, sponsored in the House by Reps. Steven Owens and Dylan Fernandes, and in the Senate by Sen. Sal DiDomenico, creates three separate classes of electric bicycles.

The bill defines the first class of electric bicycles as those with a motor that provide assistance to the rider only when they are peddling and stops once they reach 20 miles per hour. The second class covers bicycles with a motor that operate the pedals for the rider until the bike reaches 20 miles per hour. The final class is for bicycles with a motor that provide assistance only when the rider is pedaling and stops when the bike reaches 28 miles per hour.

Owens said 46 other states and the federal government have similar classifications that help regulate the use of electric bicycles. The Watertown Democrat said a legal framework would allow bicycle sharing companies like Bluebikes to start offering electric bicycles at their rental locations in Massachusetts.

"In order to unlock the full potential of e-bikes in Massachusetts, we at minimum need to have this legal framework that's in line with the e-bikes that people are actually using," he said. "This legislation would allow municipalities to start feeling comfortable starting up e-bike sharing programs."

Roslindale resident Alan Wright rode to the State House rally on his homemade electric bicycle. The 68-year-old is a lifelong cyclist who said electric bicycles are the best solution to Massachusetts' transportation problem.

"In addition to public transportation, electric bikes, you can do anything with," he said as he showed off his old bicycle that he converted into an electric machine.

Wright said he does everything with the electric bicycle from riding over to Home Depot to pick up plywood or just cruising around town. The legislation is important, he said, because it would allow the use of electric bicycles in more areas.

"If we can get the legislation passed, then it enables the cities to move ahead with putting in more bicycle infrastructure," he told the News Service.

Boston Chief of Streets Jascha Franklin-Hodge said the city is experiencing an enormous rise in on-demand delivery services. It's an area he said the Wu administration "has some particular challenges that we're wrestling with" and where e-bikes can play an important role.

The rise in the delivery services has been a lifeline to restaurants, Franklin-Hodge said, but from a transportation perspective, "this growth in on-demand delivery has been something of a disaster."

"It is fundamentally, from a transportation perspective, ridiculous that we're using 4,000-pound fossil fuel vehicles to move a chicken sandwich or a bowl of Thai food one or two miles through our very congested city. And so we think that e-bikes have a role to play in delivery and in commercial services in the city as well," he said. "... We need to have the right legal frameworks in place at the state level to make it possible for us to set up these programs and to actually try to push for policies that drive towards this shift."

For Sarah Dylan Breuer of West Roxbury, electric bicycles provide her the freedom of movement.

Breuer said she has a disability that causes any one of her limbs or fingers to dislocate at any time. That means Breuer depends on walkers, crutches, and wheelchairs to get around -- all things that are manually powered.

"And often I couldn't make it at all to doctor's appointments, into physical therapy where I would get the treatment that would maybe let me walk again," she said. "But now I have an e-bike. So I have the freedom to move from address to address. That's really, really important. It's such a basic freedom."