SACRAMENTO— The California Legislature on Tuesday became the first legislative body in the country to approve same-sex marriages, as gay-rights advocates overcame two earlier defeats in the Assembly.
The 41-35 vote sends the bill to Gov. Arnold Schwarzenegger, who had no comment on the bill when it cleared the Senate last.
The bill’s supporters compared the legislation to earlier civil rights campaigns, including efforts to eradicate slavery and give women the right to vote.
‘‘Do what we know is in our hearts,’’ said the bill’s sponsor, San Francisco Democrat Mark Leno. ‘‘Make sure all California families will have the same protection under the law.’’
Leno’s bill had failed in the Assembly by four votes in June, but he was confident he could get it through on a second try after the Senate approved a same-sex marriage bill last week.
Democratic Assemblyman Paul Koretz called bans on gay marriage ‘‘the last frontier of bigotry and discrimination, and it’s time we put an end to it.’’
Assemblyman Tom Umberg, a Democrat who abstained when another gay marriage bill fell four votes short in June, said he was concerned about what his three children would think of him if he didn’t join those ‘‘who sought to take a leadership role in terms of tolerance, equality and fairness.’’
But opponents repeatedly cited the public’s vote five years ago to approve Proposition 22, an initiative put on the ballot by gay marriage opponents to keep California from recognizing same-sex marriages performed in other states or countries.
‘‘History will record that you betrayed your constituents and their moral and ethical values,’’ said Republican Assemblyman Jay La Suer.
The vote was hailed by gay and lesbian advocates, including Geoff Kors, executive director of Equality California, a backer of the bill.
‘‘As the debate today shows, love conquers fear, principle conquers politics and equality conquers injustice, and the governor can now secure his legacy as a true leader by signing this bill,’’ Kors said.