California became the second state to allow same-sex marriages on Monday, as ceremonies were held across the state to mark the groundbreaking change in legislation.

A landmark California Supreme Court ruling overturning bans on gay marriage went into effect at 5 p.m. PT Monday and clerks in at least five counties began handing out gender-neutral marriage licences.

At San Francisco City Hall, Mayor Gavin Newsom was presiding at the wedding of lesbian rights activists Del Martin, 87, and Phyllis Lyon, 83, as a cheering crowd of supporters and a marching band gathered at the building's entrance.

The elderly couple cut a cake together in front of a throng of reporters and cameras.

"These are not folks who just met each other last week and said, 'Let's get married.' These are folks who have been together in some cases for decades," said Kate Kendell, executive director of the National Center for Lesbian Rights.

"They are married in their hearts and minds, but they have never been able to have that experience of community and common humanity."

Same-sex couples were also tying the knot in Sonoma, Los Angeles, Yolo and Alameda counties.

Massachusetts is the only other state where gay marriage is legal.