In 2011, Gov. Jerry Brown vetoed a bill that would have made it illegal to protest within 1,000 feet of a funeral, citing free speech rights - but on Monday, he was happy to sign a similar, albeit scaled-back, version of the law.

The bill by state Sen. Ted Lieu, D-Torrance (Los Angeles County), bars protesters from 300 feet of any funeral, and grew out of national disgust over the picketing of military memorials by an antigay church.

Family members had sued the Westboro Baptist Church over those protests, and the U.S. Supreme Court ruled last year that the church had the right to be there. After that ruling, Lieu first attempted a more wide-ranging ban - in addition to the 1,000-foot buffer zone, the original legislation would have only barred protests based on the race, religion, sexual orientation or conduct of the deceased or those attending the funeral.

The bill that Brown signed Monday, SB661, cut the buffer zone to 300 feet and expanded it to any funeral demonstration, regardless of the protesters' message. It was passed with bipartisan support in both houses of the Legislature and takes effect Jan. 1.

"This carefully crafted measure balances the constitutionally protected right of free speech with limited restrictions on the time, place and manner in which protests at funerals can be held," Lieu said. "We've all been disgusted by hateful protests at military funerals, and that should now be reduced or stopped."

The American Civil Liberties Union opposed the bill, saying the buffer zone goes beyond what is necessary to protect grieving families, that state law already prohibits the disruption of funerals, and that a number of courts have struck down attempts to impose a 300-foot no-protest zone.

The ACLU supported another bill that Brown signed Monday: AB472, which will bar prosecution of drug users who seek medical services for themselves or others.

The law, which also takes effect next year, was written by Assemblyman Tom Ammiano, D-San Francisco, and is aimed at saving the lives of overdose victims whose friends might be too scared to call 911.