San Francisco has been a transportation innovator since Andrew Smith Hallidie invented the cable car in 1873.

We shouldn’t stop now.

Our growing city needs that innovation to continue to thrive, but innovation must be appropriately balanced with public safety. It cannot come at the price of shattered teeth, broken bones or worse.

The latest entrant on the transportation scene — electric scooters — can be a safe, green, complementary piece to the range of transportation choices in San Francisco.

For that to happen, e-scooter companies such as Bird, Lime and Spin need to work with the city, not against it.

San Francisco is not interested in banning an emerging industry. We all have a stake in fostering clean, efficient, new forms of transportation. But companies have a responsibility to ensure that their products are used lawfully and do not create a public nuisance. It is about striking the right balance with safety.

Companies such as e-moped service Scoot and dockless bike-share provider Jump Bikes are two recent examples of the benefits of cooperation. They worked with the city, obtained specially designed permits and flourished.

Unfortunately, Bird, Lime and Spin have so far chosen not to work with the city to the same degree. They dropped hundreds of their scooters on our sidewalks in an apparent rush to get their products out before a thoughtful permit system was in place, even though one was in the works.

While plenty of people have enjoyed using the scooters to get around without tailpipe emissions or the hassles of a car in traffic, these machines have also caused problems.

The city has received scores of complaints from understandably upset residents, workers and merchants reporting that they have been hit or narrowly missed by scooters riding on sidewalks or found scooters blocking sidewalks, bus stops and stair railings. Some reported making those discoveries only after tripping over the scooters.

We want to ensure that our streets are both safe and do not become dumping grounds for mounds of unwanted transportation devices. The piles of dockless bike-share cycles in many Chinese cities are a cautionary tale.

Tellingly, none of these scooters first put on San Francisco’s sidewalks had instructions on them informing riders that it is illegal to operate them on sidewalks, which is where they pose the greatest danger to pedestrians.

Cities such as Singapore, which have had e-scooters around for much longer than San Francisco, provide insight. There, news accounts describe 30 e-scooter accidents involving pedestrians on footpaths and walkways in the first eight months of 2017. In 2016, a mother was in a coma for weeks and hospitalized for three months after being hit by an electric scooter. Those reports also indicated an 11-year-old girl and a 6-year-old boy were both hospitalized after e-scooter riders crashed into them in separate incidents in April 2018. The girl had two teeth knocked out and had to have her jaw realigned.

To prevent situations like these, I issued cease-and-desist letters this week to scooter companies Bird, Spin and Lime directing them to stop acting illegally and start following the law. Among my concerns were the use of these vehicles on sidewalks and the hazards they create for pedestrians.

Now is the time for these companies to follow the law and work in good faith with the city on permitted operations that balance convenience with public safety.

The overarching premise is simple: Ride scooters in the right place, park them in the right place.

That will be a win for everyone.

Dennis Herrera is the city attorney of San Francisco.