Cities in San Diego County vary widely in how they regulate bicycling on sidewalks, an increasingly controversial topic as more people are being encouraged to walk and bike in lieu of driving their cars.

While there’s widespread perception that sidewalk bicycling is totally illegal, only five local cities — Escondido, El Cajon, Carlsbad, Vista and National City — have banned it, and the vast majority allow it either everywhere or in most residential areas.

That contradiction and the hodgepodge of local regulations confuses both walkers and cyclists as they battle for space on local sidewalks, especially with most neighborhoods still lacking protected bike lanes.

Collisions causing injuries are rare between cyclists and walkers, but advocacy groups for both say the conflict must be resolved to boost safety, alleviate fear and avoid making people reluctant to bike or walk.

Experts, however, say there are no easy, immediate solutions.

A comprehensive network of protected bike lanes would give cyclists a safe place to ride instead of the sidewalk, but that network will take many years and many millions of dollars to complete, leaving the conflict unresolved in the interim.

In addition, there’s been a backlash against bike lanes in many local communities because they eliminate parking spots and driving lanes but are rarely used by cyclists.

Another potential solution is banning sidewalk bicycling. But because the state allows cities to make their own rules on the issue, many say efforts to ban would likely be piecemeal and create confusion instead of solving the problem.

There are also questions about how feasible aggressive enforcement would be, and the potential effect on young children biking in suburban neighborhoods.

And cycling advocates say that while roads are typically safer than sidewalks for cyclists, there are some particularly busy or narrow streets where sidewalk cycling makes sense.

“People will ride where they feel safest,” said Andy Hanshaw, executive director of the San Diego County Bicycle Coalition. “We need a connected and protected network.”

Cities across the region have prioritized creating such a network in recent years, and most cycling and pedestrian advocates call that the best long-term solution.

"Until we have protected and buffered bike lanes, the conflict will perpetually exist without any solution between pedestrians and bicyclists," said Maya Rosas, advocacy manager for Circulate San Diego, a nonprofit that promotes walking, bicycling and mass transit

And Rosas said a protected cycling network would do as much to help walkers as cyclists by restoring safety to local sidewalks.

"Pedestrians are the most vulnerable people on the street — they don't have any armor or a helmet,” she said. “Their safety should be the primary concern for designing safe streets."

Kate Kraft of the national nonprofit Walk America said the potential for injuries shouldn't be entirely downplayed.

"Clearly a bike won't hit you as hard as a car, but bikes can go very fast and they can hurt people," she said.

A comprehensive network of protected bike lanes would correct a glaring oversight by urban planners, who left cyclists out of the equation when creating streets for cars and sidewalks for pedestrians.

And studies have shown that sidewalk bicycling shrinks sharply when protected bike lanes are installed in an area.

"It seems to be an immutable law that when you put a protected bike lane on the street and make people feel they can ride and be safe from cars, sidewalk biking drops by half over night," said Michael Anderson of the national nonprofit PeopleForBikes.

Anderson said bike lanes do much more to solve the problem than bans.

"There is no way you could get that kind of result with a ban and increased enforcement," he said. “You would have to have police out there 12 hours a day."

But longtime San Diego resident Dana Kuhn said he thinks a ban makes sense, partly because most people already believe sidewalk bicycling is illegal.

"It's inconceivable to me that bicycling is allowed on sidewalks,” he said. "I always thought that was the pedestrian’s domain. When I used to cycle to work, I took my chances on the street because I thought I belonged there."

A ban would also make cities less vulnerable to lawsuits from cyclists injured by sidewalks damaged by tree roots or other problems.

San Diego paid nearly $5 million this spring to a man for severe injuries he suffered when he and his bicycle were launched 28 feet by tree-damaged sidewalk in a residential part of Del Cerro in 2014.

Kuhn said such payouts are far less likely to pedestrians because they are moving much more slowly than cyclists, reducing the potential for injury and making it easier for them to spot flaws in the sidewalk before reaching them.

Bans, if aggressively enforced, could also improve the safety of bicyclists. Experts say cyclists riding on sidewalks are mostly mistaken in their perception that they are safer than on the street.

The risk of cars unexpectedly coming out of a driveway are said to be higher than from cars swerving into a cyclist or hitting them from behind.

In addition, cars often don’t see cyclists on the sidewalk and would never expect anything there to be moving that fast, making it more likely they will turn into a cyclist who is entering an intersection from the sidewalk.

"People are irrational, unfortunately," said Anderson, the national cycling advocate. "Someone who is riding on the sidewalk is trying to ride in the protected bike lane that isn't there."

State officials in the 1970s decided to leave the thorny issue of regulating sidewalk bicycling to cities and counties, allowing local governments to adopt rules that fit them best.

It’s one of the rare instances where the California Vehicle Code allows such wide local discretion, and it’s led to significantly varying regulations across the state and San Diego County.

But it’s also created confusion because the rules vary so much.

Locally, Escondido, El Cajon, Carlsbad, Vista and National City have banned sidewalk cycling in all places.

But sidewalk cycling is allowed everywhere in San Marcos, La Mesa and Del Mar, because those cities have never adopted local legislation.

"If the city is silent, the de facto interpretation is that it's legal to ride a bike on the sidewalk because there is no specific legislation that prohibits it," said Christopher Kidd, who created a matrix of local regulations for all 537 cities and counties in California while working for the Los Angeles Department of Transportation.

A less absolute approach was taken by the San Diego County government and most other local cities, including San Diego. They allow sidewalk cycling in residential areas as long as cyclists exercise “due care,” but ban it in business districts.

Oceanside took a similar approach, but instead of relying on the state’s definition of a business district, Oceanside officials decided to allow sidewalk cycling everywhere except a clearly defined set of commercial streets near the city’s pier.

Kidd said banning sidewalk cycling in business districts is a common theme across the state, with 126 cities and counties choosing that approach compared to 102 who have chosen complete bans.

"When you have an area where there are going to be a lot of people on the sidewalk, you generally want to keep bikes off of it," he said.

But he said the state’s complicated definition of a business district can be confusing, because it sometimes includes areas with apartment complexes or a mix of residential and commercial uses.

He said 65 of the 126 cities choosing business district bans chose to define the banned area themselves, while 61 relied on the state code to determine the areas.

Forty-three local governments have passed legislation allowing sidewalk cycling everywhere, and another 221 allow it everywhere because they have not passed any legislation.

Several cities in the Bay Area have adopted more permissive sidewalk cycling rules for minors, but that approach is rare in Southern California and absent in San Diego County.

"A lot of times you see cities in a region borrowing from each other," Kidd said.

It’s rare for cyclists, pedestrians or even police to be familiar with the varying regulations, making them unlikely to be obeyed or enforced, he said.

"You have people complain about bikes on the sidewalk even in places where it's legal," said Kidd, adding that cities rarely post signs about their regulations. "The rules are very non-intuitive and they’re also usually not visible anywhere."

Anderson said cities rarely spend much time considering their sidewalk cycling rules or their impacts.

"These local rules aren't usually based on any rigorous decisions — it's just what somebody decided on at one point," he said.