Once again, the most hard-fought provision in the proposed San Francisco budget has to do with whether sworn institutional police officers and sheriff's deputies should be providing hospital security - an issue that has reverberated to the mayor's race.

Mayor Ed Lee, like his predecessor, has proposed contracting out security services at San Francisco General Hospital and Laguna Honda Hospital. The officers and deputies who work there would be moved to positions at clinics, jails, courts and City Hall.

The move could save millions of dollars a year, officials say.

Although none of the 71 city workers employed at the hospitals would lose their jobs, the move is being fought by Service Employees International Local 1021, the largest city employees union in San Francisco and one that provides muscle and money in local campaigns.

The union has regularly fought any attempts to bring in private security companies and has promised to consider endorsing candidates who agree.

On Wednesday, three mayoral hopefuls in the November election stood on the steps on City Hall at an anti-privatization rally organized by SEIU Local 1021. They included Supervisor John Avalos, former Supervisor Bevan Dufty and Assessor-Recorder Phil Ting. State Sen. Leland Yee, another hopeful, sent an aide to speak on his behalf. City Attorney Dennis Herrera was scheduled to attend but was a no-show. Supervisor Ross Mirkarimi, who is running for sheriff in the November election, served as master of ceremonies.

The Board of Supervisors' Budget Committee could decide today, after more closed-door negotiations, whether to include the contracting-out proposal in the final budget package submitted to the full board for consideration.

One idea the committee is exploring is whether to create a hybrid hospital security team that uses both contracted employees and city staffers.

The issue frequently resurfaces in City Hall, particularly in tough budget years.

The San Francisco Department of Health wants to outsource its security, which costs $9 million a year at the two hospitals. A private company could save the city an estimated $4 million a year, the agency believes, although it would be at least six months before the change could be made.

That could mean the agency would have an extra $2 million in the new fiscal year that starts Friday to offset other potential cuts to its health programs, said public health chief Barbara Garcia.

The Sheriff's Department could also benefit. Moving deputies to other positions could save up to $1 million in the new fiscal year and $2 million annually in future years by cutting overtime and reducing the need to hire additional deputies, said Undersheriff Jan Dempsey.

Garcia said there are other reasons to privatize the security force.

For example, some patients become disruptive due to medical conditions, such as delirium or a brain injury. Sheriff's deputies can't intervene unless the person is deemed a threat, or unless the patient is acting illegally; private guards don't have such restrictions, she said.

But critics say that institutional police officers and sheriff's deputies have considerably more training to deal with volatile situations. In addition, they say, city workers provide a much more stable workforce than do security guards, where the pay is lower and the turnover is higher.

"I'm committed to the hospital and am prepared to do whatever it takes to protect it," said Michael Tong, an institutional police officer for 16 years who started at San Francisco General and now works at Laguna Honda.

Jeanette Conley, a nurse working with psychiatric patients at San Francisco General, opposes the proposed switch, citing concerns for the safety of workers and patients. "I'm afraid what will happen if they contract out."

Garcia said that any guards brought in would be certified in prevention of workplace violence, be specially trained to work in a hospital, and have had experience working in a health care setting.