The City Hall chambers were packed with supporters of the bill which was heard by the supervisor's Public Safety Committee.

This whole issue of whether to turn over young illegal immigrants to federal authorities when they're arrested has created a firestorm of controversy.

"It is really, really important to be able to protect children and not to break up families here in San Francisco," said Diana Oliva from the San Francisco Immigrant Rights Community.

Almost all those who spoke at the committee hearing supported the bill. It would change Mayor Newsom's policy allowing illegal immigrant minors arrested and booked on a felony to be released to federal authorities.

"The sanctuary city policy was never intended to be a shield for criminal behavior," said Mayor Newsom's spokesperson Nathan Ballard.

Supervisor David Campos' bill would forbid police from transferring them to federal custody unless they're convicted of a felony or they're charged as an adult.

Campos said his legislation was at the heart of the legal system.

"The notion that you are innocent until proven guilty, so this is about giving children their opportunity to have their day in court," he said.

Colin Gallagher was one of the few opponents who spoke against the bill.

"It doesn't make sense to have law enforcement resources spent trying to stymie or interfere with federal immigrant law," said Gallagher.

City attorney Dennis Herrera told the mayor in a memo that he believes the legislation will likely result with a" federal legal challenge which may jeopardize the city's entire sanctuary policy."

"He has said it will expose San Francisco to serious litigation," said Herrera.

But Campos said his bill can be defended in court. It's consistent with the powers that police, police powers, that the constitution provides local governments.

Supervisor Michela Alioto-Pier says she voted against the bill because of those serious legal questions.

"We don't want to do something that throws out our sanctuary city policy for example, if we take those steps we could be going backwards and not forwards," said Alioto-Pier.

Mayor Newsom has promised to veto the bill if it passes and chances are it will. Eight supervisors support it and that's enough to overturn his veto.

The committee voted two-to-one to send it to the full board which will hear it in two weeks.