SAN FRANCISCO — Saying that it discriminates against gay men and women, a federal judge in San Francisco struck down California’s voter-approved ban on same-sex marriage on Wednesday, handing supporters of such unions at least a temporary victory in a legal battle that seems all but certain to be settled by the Supreme Court.

Wednesday’s decision is just the latest chapter in what is expected to be a long battle over the ban — Proposition 8, which was passed in 2008 with 52 percent of the vote. Indeed, while striking down Proposition 8, the decision will not immediately lead to any new same-sex marriages being performed in California. Vaughn R. Walker, the chief judge of the Federal District Court in San Francisco, immediately stayed his own decision, pending appeals by proponents of Proposition 8, who seem confident that higher courts would hear and favor their position.

But on Wednesday the winds seemed to be at the back of those who feel that marriage is not, as the voters of California and many other states have said, solely the province of a man and a woman.