A controversial measure that dictates how San Francisco police deal with underage illegal immigrants goes into effect Thursday.

The law, approved by the city's Board of Supervisors in October, prohibits law enforcement from turning over minors to federal authorities unless they are felons.

Mayor Gavin Newsom vetoed the legislation last month, saying it violates federal law. But the supervisors overrode his veto. Proponents say the measure preserves the minors' right to due process.

The law replaces a policy Newsom's administration abandoned in 2008, when the city was accused of protecting from deportation young offenders who went on to commit other crimes.