SACRAMENTO — Gov. Gavin Newsom vetoed a bill late Saturday to end the practice of county jails releasing people during the middle of the night when they don’t have a safe ride or access to mass transit.

SB42 by Sen. Nancy Skinner, D-Berkeley, would have required jails to offer inmates scheduled to be released between sunset and 8 a.m. the option to remain in jail or a safe waiting area until business hours and to provide them with access to a phone.

“Jails should not be releasing inmates onto the street during overnight hours,” Newsom said in a veto message. “This is simply an unsafe practice, resulting in many tragic and preventable outcomes over the years.”

But he said requiring a new policy would force the state to reimburse counties for the cost of keeping inmates in jail an extra night, a significant expense.

“The bill’s intent can be accomplished through a more tailored approach that does not put the state treasury on hook for local jail operation costs which are a local responsibility,” he said.

Skinner said the legislation was inspired by the case of Jessica St. Louis, who died last year after she was released from Alameda County’s Santa Rita Jail at 1:30 a.m., when no transit was available. Her body was found outside the Dublin/Pleasanton BART station after an apparent drug overdose.

“Jessica’s death was preventable,” Skinner said. “Releasing people in the dead of night when they may not have a ride or a safe place to go is cruel and unnecessary treatment.”

The bill was opposed by the California State Sheriffs’ Association, which said the “unfunded mandate” could force them to cut other services. The association told lawmakers that “the reach and responsibility of public entities can only extend so far” after an inmate is released.

Dustin Gardiner is a San Francisco Chronicle staff writer. Email: dustin.gardiner@sfchronicle.com Twitter: @dustingardiner