SAN FRANCISCO — As California cities move to reclaim their streets from automobile domination, Market Street in San Francisco is the most ambitious effort so far.

Lined by skyscrapers, landmark buildings, tech powerhouses and ornate street lamps, Market cuts through the heart of San Francisco and has long had the traffic jams that come with the prime real estate. Generations ago, many of the city’s streetcar and cable car lines were pulled out to make way for the mighty automobile.

A few weeks ago, there was a dramatic shift when San Francisco banned private cars on the busiest section of Market Street. Suddenly most automobiles were gone — Ubers, Lyfts, and tourists in rental cars banished. Historic streetcars and electric trolley buses glided along. Cyclists and electric scooter-riding commuters celebrated their new freedom.

“There is a generational transformation that has occurred here,” said Malcolm A. Heinicke, chairman of the San Francisco Municipal Transportation Agency’s board of directors, who has called for discussion of closing other roads, like Valencia Street in the Mission District and Leavenworth Street in the Tenderloin, to cars. “You have people who are really looking at having a city where they’re not driving.”

It’s part of a growing trend across North America.

Alarmed by rising traffic deaths and painful gridlock on downtown streets, New York City, Seattle, Denver, Minneapolis, Toronto and other cities have instituted restrictions — forcing vehicles to share fewer lanes, ending curbside parking during rush hour or banning virtually all cars from signature boulevards in favor of mass transit.

Los Angeles is considering its own bold step: dramatically reducing the number of lanes for traffic along Hollywood Boulevard.

Despite intense opposition from some residents, New York in October banned almost all vehicles — except buses, trucks and cars making local trips — on a critical crucial east-west route crossing Manhattan between 6 a.m. and 10 p.m. Soon, buses on 14th Street, which had been given the “Pokey Award” by transit advocates for being home to the slowest bus route in the city, crawling at 4.3 mph, saw faster speeds and a jump in ridership.

Facing explosive growth and worsening traffic, Seattle in 2018 dramatically expanded a ban on cars on 3rd Avenue, the city’s busiest bus corridor, from 6½ hours every weekday to 13 hours every day — reserving use for buses and cyclists.

Denver and Minneapolis have added bus-only lanes at the expense of regular lanes or curbside parking. In Toronto, signs on King Street now instruct cars to exit the roadway, giving priority to streetcars.

On Wilshire Boulevard, Los Angeles five years ago completed 7.7 miles of bus-only lanes that restrict cars during rush hour; the same was done downtown for the afternoon commute on Flower Street last year. Auto lanes on Broadway, Spring and Main streets downtown have been removed to expand space for pedestrians and bicycles, and sections of streets at the Sunset Triangle in Silver Lake, Leimert Park and North Hollywood have been converted into pedestrian plazas.

Now officials want to widen sidewalks, add bike lanes and narrow the roadway along Alameda Street in front of Union Station.

Prioritizing mass transit or pedestrians in congested downtowns is not a new idea.

Minneapolis banned cars along a stretch of Nicollet Avenue in the 1960s; Denver did the same along 16th Street in 1982. An early suggestion to ban cars on Market Street in 1963 only led to wider sidewalks, according to the San Francisco Chronicle; repeat proposals in the 1980s, ’90s and 2000s also came up short.

Recent moves to restrict car traffic on signature routes come amid increasing alarm about pedestrian and cyclist deaths. Such fatalities are at the highest level nationally since 1990 — with more than 6,000 pedestrians and 800 cyclists killed in 2018, according to the National Highway Traffic Safety Administration.

In San Francisco, about 30 people annually lose their lives in traffic accidents.

City officials nationwide talk of “Vision Zero,” a goal of eliminating all traffic deaths, and “complete streets,” which value safety not only for cars but also pedestrians, cyclists and transit riders.

“If there are things that we can do to improve the way that people get around and reduce the number of fatalities, then we should do them,” said Zabe Bent, director of design for the National Assn. of City Transportation Officials.

In San Francisco, half of the 10 worst intersections for injuries and fatalities are on Market Street, said Jeffrey Tumlin, executive director of the city’s Municipal Transportation Agency. That realization was a strong factor in deciding that something had to change on Market, where automobiles were sharing the road with a large number of cyclists, pedestrians and buses.

“San Francisco’s job and housing growth over the last 10 years has been very strong,” Tumlin said. “Our streets are not getting any wider, but they need to accommodate more people.”

While a single lane of traffic can carry hundreds of people per hour in private cars, a dedicated transit lane can transport thousands every hour.

The relationship between passenger vehicles and streetcars on Market has long been an uneasy one.

Four lanes of streetcars once dominated the 120-foot-wide spine of the city, connecting the prominent landing spot for ships — where the Ferry Building is today — to Twin Peaks, one of the highest points in San Francisco, rising far above the bay, Tumlin said.

Designed as San Francisco boomed immediately after the Gold Rush, Market Street unified two settlements: the one around Portsmouth Square in today’s Chinatown, built in a north-south orientation, and what is now the South of Market district, oriented along a northwest-to-southeast alignment that paralleled the coast.

“Because it is the seam between the two primary street grids, the result is a crazy tangled mess of streets running into each other that has been confusing since the earliest days of San Francisco,” Tumlin said. “It’s also the street where the entire transit system comes together. So almost all of the major bus and light rail lines in San Francisco end up on Market Street.”

But cars were destined to dominate. The San Francisco-Oakland Bay Bridge opened in 1936. After World War II, the city pulled out more cable car and streetcar lines, and freeways were built along the Embarcadero and through the heart of the city. Some streets were converted to one-way traffic, speeding drivers into the city from the suburbs.

But unlike cities where streetcars were obliterated from the landscape, a shrunken network of rail lines managed to survive on Market Street. And by the 1990s and 2000s, public sentiment began to shift.

Elected officials sought the demolition of two double-decker freeways damaged in the magnitude 6.9 Loma Prieta earthquake in 1989. High-profile coverage of deaths of pedestrians and cyclists in traffic collisions led to demands for change. The more recent tech boom caused the population to soar, with more than 880,000 people in the city, up from about 680,000 in 1980.

“We’ve never been this populous before,” San Francisco historian John Freeman said. “You can’t take a 19th century city and … put that many cars in the system.”

The latest restrictions, part of a project called Better Market Street, don’t eliminate all auto traffic; besides streetcars and buses, taxis and commercial delivery trucks are still allowed. And more changes are scheduled for the coming years to improve the 2.2-mile stretch roughly between the Ferry Building and Mid-Market, including a bikeway separated from street traffic and bigger platforms to board streetcars.

The changes posed challenges for some, including licensed art vendors at Embarcadero Plaza who lost six curbside parking spaces and say they’re faced with higher parking costs and more difficulty unloading their cars.

“It’s very, very difficult,” said Aurelio Mucci, 55, who sells bracelets and earrings. “It’s very tough and complicated for the artists.”

Lyft driver Shirzai Meerzada, 35, said the ban on cars will serve only to worsen traffic on surrounding roads, and suggested the city remove bus-only lanes on nearby Mission Street. He said he expected Lyft users to cancel rides if they can’t be picked up quickly.

Maryo Mogannam, president of the San Francisco Council of District Merchants Assns., said he’s concerned about how the city will manage the construction, and whether officials will follow through on maintenance and upkeep. “After what we saw what the BART project did to Market Street back in the ’60s, it still hasn’t recovered from that,” he said.

Others, however, voiced support for the project — including Jay Cheng, policy director for the San Francisco Chamber of Commerce, who thinks office workers and tourists will find Market Street calmer and safer. “We really believe it’s going to … give a better experience to visitors and our tourists.” Besides, the San Francisco of today has far more transportation options — like Uber, Lyft, rentable bikes and electric scooters — than a decade ago, “so people are less reliant on their private vehicles,” Cheng said.

“I’m glad they’re doing it,” said Adam Smith, owner of Fog City News, a newsstand at 1st and Market streets, hoping the ban will reduce noise and pollution. “The city is so over-congested because of all the Uber drivers.” Most of his customers are office workers who take mass transit, he said.

San Francisco resident Frank O’Connell, 60, said the new rules will probably save riders on the city’s Muni system on Market Street five to seven minutes on their rides home and could relieve pressure on overcrowded Muni subway trains.

“Emergency rooms are not going to be as nearly as impacted, because there’s going to be fewer accidents,” he said.