Phyllis Lyon, who when she married her partner, Del Martin, in 2008 became part of the first legal same-sex union in California, died on Thursday at her home in San Francisco. She was 95.

Her sister, Patricia Lyon, confirmed the death.

It was not their first wedding. In 2004, despite state and federal bans on same-sex marriage, Mayor Gavin Newsom of San Francisco began issuing marriage licenses to same-sex couples. Ms. Lyon and Ms. Martin were the first to receive one, but that union would be short-lived. The California Supreme Court invalidated their marriage a month later, arguing that the mayor had exceeded his legal authority.

Four years later, the same court declared same-sex marriages legal and Mr. Newsom invited the couple back as the first to be married under the new ruling. Ms. Martin died shortly after.

“I am devastated,” Ms. Lyon said following her wife’s death. “But I take some solace in knowing we were able to enjoy the ultimate rite of love and commitment before she passed.”