A new tax on Uber and Lyft rides in San Francisco will generate revenue to fix Muni’s chronic driver shortage, one of the biggest problems facing the agency.

The measure that passed by a two-thirds vote this month will levy a 3.25% tax on most ride-hailing trips, with a 1.5% rate for shared rides, beginning in January. Rides in electric vehicles would have a 1.5% surcharge whether they are solo or shared.

Collectively, these charges are expected to reap $35 million a year for transit and street-safety projects, a windfall that the city should start to see as soon as next summer.

Mayor London Breed and Supervisor Aaron Peskin, who co-sponsored the measure, laid out spending plans on Tuesday. They hope to recruit and train larger classes of bus and train operators, expand training resources and improve system management on Muni lines. Additionally, the city will devote $1.3 million annually toward low-cost street redesigns to protect pedestrians and cyclists.

In a statement Tuesday, Peskin struck an exultant tone.

“We heard overwhelmingly from voters that one of their top priorities was hiring more Muni drivers to keep our city moving, so I’m thrilled to see SFMTA ready to act on this mandate,” said the supervisor, who also chairs the San Francisco County Transportation Authority board.

Peskin has spent years pressing for some form of tax on private transportation companies — an acknowledgment of how much congestion these vehicles add in San Francisco. He persuaded Uber and Lyft to back Proposition D as preferable to an earlier idea: a more onerous gross receipts tax of up to 0.975%.

Transportation researcher David Bragdon, who heads the TransitCenter foundation in New York, called the new tax a “progressive move,” in that it extracts a price from motorists for the traffic jams, safety hazards and pollution they inflict on San Francisco. It’s among several projects that signal a shift in mentality: The SFMTA board recently voted to ban cars on the downtown section of Market Street, and the agency is pursuing dozens of “quick-build” street modifications, such as protected bike lanes and shorter crosswalks.

Incoming transportation director Jeffrey Tumlin has been outspoken about managing traffic and creating more space for vehicles other than cars. Uber and Lyft account for 13% of vehicle miles traveled in San Francisco, according to a study published in August that the companies commissioned.

In a statement, Breed characterized Prop. D — called the Traffic Congestion Mitigation Tax — as crucial to “relieve congestion and invest in critical transportation and safety projects throughout our city.”

One of the mayor’s primary transportation goals is to improve Muni’s performance, which has suffered because the agency lacked drivers.

San Francisco Municipal Transportation Agency currently has about 230 bus operator vacancies in its workforce of about 1,900. The agency needs to hire about 200 operators a year to keep service running on time, compensating for the 100 operators who leave, the 50 or 60 who get promoted to supervisor positions and the 40 or 50 who complete a rail training course.

Muni met its goal to graduate 200 new bus operators from training this year, more than double last year’s number of 78. The agency faced intense political pressure from City Hall following a meltdown in the summer of 2018, when the previous director of transit poached buses and drivers from lines throughout the system to run shuttles around the closed Twin Peaks Tunnel.

New transit director Julie Kirschbaum now presents detailed reports to the SFMTA Board of Directors each month, which include strategies to hire more operators and improve service.

The city is also under scrutiny as the number of traffic fatalities gains on the number of homicides. Twenty-seven people have died in crashes on city streets, interim transportation chief Tom Maguire said at a board meeting last week — slightly fewer than the 33 people slain.

SFMTA has emphasized quick-build improvements as a way to engineer against these tragedies, reconfiguring streets to force drivers to slow down, and make more room for other vehicles. Next on the list: a north-south protected bike lane on Embarcadero, a bustling roadway where bikes and pedicabs jostle among cars and trucks.

Rachel Swan is a San Francisco Chronicle staff writer. Email: rswan@sfchronicle.com Twitter: @rachelswan