Sen. Mark Leno (D-San Francisco) said he authored the measure to address the changes in family structure in California, including situations in which same-sex couples have a child with an opposite-sex biological parent.

The law will allow the courts to recognize three or more legal parents so that custody and financial responsibility can be shared by all those involved in raising a child, Leno said.

“Courts need the ability to recognize these changes so children are supported by the adults that play a central role in loving and caring for them,” Leno said. “It is critical that judges have the ability to recognize the roles of all parents so that no child has to endure separation from one of the adults he or she has always known as a parent.”

The bill was partially a reaction to a 2011 court decision involving a lesbian couple that briefly ended their relationship, according to Leno’s office. One of the women was impregnated by a man before the women resumed their relationship. A fight broke out, putting one of the women in the hospital and the other in jail, but the daughter was sent to foster care because her biological father did not have parental rights.