The diocese chose the Rt. Rev. Mark Handley Andrus of Birmingham, Ala., who had emerged as a favorite in the first ballot. After four hours, he had 72 percent of the clergy vote and about 55 percent of the lay vote, the San Francisco Chronicle reported.
The 77 million-member Anglican Communion -- represented in the United States by the Episcopal Church -- is still reeling from the 2003 election of its first openly gay Episcopal bishop, V. Gene Robinson of New Hampshire.
Episcopalians differ over whether the Bible permits ordaining gays but agreed that choosing a second leader who is in a same-sex relationship would severely damage relations within the global Communion, the newspaper said.
One delegate, the Rev. Mark Spaulding of Holy Cross Church in Castro Valley, said he didn't know anyone for whom sexual orientation was a factor in voting.
"This diocese would've been fine with any one of the seven," he said.
The packed Grace Cathedral erupted with cheering and applause when it was announced that Andrus had been elected.
Pot vending machine to debut
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend