LOS ANGELES — The two couples who sued to overturn California’s ban on same-sex marriage were married late Friday afternoon, just hours after the United States Court of Appeals for the Ninth Circuit, in San Francisco, lifted the stay that had been in place.

The court had stopped same-sex marriages while the case wound its way through the Supreme Court, which issued its decision to clear the path for same-sex marriages in California on Wednesday.

Attorney General Kamala Harris rushed to San Francisco City Hall within minutes of the ruling to perform the wedding for Kris Perry and Sandy Stier, who have been together for more than 15 years and have four sons.

Many legal experts and advocates had expected the court to wait for an official decision from the Supreme Court, as is the normal practice. But after the initial ruling was issued on Wednesday, Ms. Harris urged the Circuit Court to act immediately and said she would ensure that all counties in the state were prepared to issue licenses to same-sex couples.