The mayor of San Francisco is waging war against his own city hall over its decision to protect juvenile illegal immigrants from being deported -- even when they stand accused of felonies.

Overturning the city's current policy, San Francisco's Board of Supervisors voted last week to stop handing illegal minors over to the feds unless they've been convicted of a serious crime. Their vote upends a year-old policy that sent more than 100 suspects into federal custody for deportation.

The measure's sponsor, once an illegal immigrant himself, says innocent youths were being deported and their families were being torn apart by the city's law.

"This is really for our youth, for our kids," said supervisor David Campos, who came to the U.S. from Guatemala at the age of 14. "Because they deserve nothing more, nothing less than full equality with how the law treats them."

But Mayor Gavin Newsom, who is running for governor of California, says the board has perverted the city's "sanctuary" policy, which was supposed to make the city safer by allowing illegal immigrants to report crimes without fear of being deported.

He says the new law now makes it easier for illegal immigrants to commit crimes.

"The sanctuary city was never designed to be in any way, shape or form a framework where people can commit crimes and be shielded against those crimes," said Newsom. "I mean that's perverse, it's absurd."

The Board voted 8-2 for the change, an essentially veto-proof majority that leaves Newsom's hands tied. But the mayor isn't buying in.

Newsom says the change violates federal law, and has directed police and probation officers to ignore the rule, which the city's law enforcement officials say they're prepared to do.

Newsom's tougher policy came about last year after a series of high-profile crimes and controversies involving underage illegal immigrants.

San Francisco began informing Immigrations and Customs Enforcement agents about the illegal minors after news broke in July 2008 that the city had shipped eight young crack dealers from Honduras to a group home in Southern California to escape the grasp of ICE officials. Once there, they easily escaped the facility and were back on the street.

Pressure mounted even more when a San Francisco woman pushed for deportations after her husband and two of their sons were allegedly gunned down by an illegal immigrant gang member who was twice arrested for violent crimes as a youth but -- protected from deportation by the sanctuary law, first enacted in 1989.

But some activists who support the board's decision to loosen the law say the measure is a necessary change that will give the accused a chance of a fair trial.

"What we're saying is people deserve their day in court," said Ana Perez, executive director of the Central American Resource Center, who came to the U.S. from El Salvador as an illegal alien in the 1980s. "If they're guilty, we're not saying don't deport them."

Fox News' Claudia Cowan contributed to this report.