The Anglican Church has avoided a potentially damaging row over gay clergy after California's Episcopal Church chose a married man as bishop.
The vote was carried out by members of the diocese
Mark Andrus, a Suffragan Bishop in Alabama, was elected after three rounds of voting by lay and clergy delegates.
Three gay candidates, whose nomination sparked fears of a Church split, failed to make the impact that was predicted.
The election of openly gay priest Gene Robinson as Bishop of New Hampshire three years ago caused great division.
The Archbishop of Canterbury, Dr Rowan Williams, had expressed unease over the nominations for the next bishop of the California diocese.
Seven-hundred priests and lay people gathered at Grace Cathedral in San Francisco for the election.
After two rounds of voting were announced, the Right Rev Mark Handley Andrus of Alabama, and the Rev Canon Eugene Taylor Sutton, canon pastor of Washington National Cathedral, were leading.
Rev Andrus was declared winner after the third round, the diocese said on its website.
Splintering the church
The Reverend Bonnie Perry, from Chicago, who had hoped to become the first lesbian bishop in the church, withdrew her nomination shortly before noon, the AP said.
The other gay candidates were Canon Michael Barlowe, who works in the Diocese of California, and the Very Rev Robert Taylor of Seattle.
Reverend Mark Handley Andrus, Diocese of Alabama
Reverend Canon Michael Barlowe, Diocese of California
Reverend Jane Gould, Massachusetts church rector
Reverend Bonnie Perry from Chicago
Reverend Donald Schell from San Francisco
Canon Eugene Taylor Sutton from the National Cathedral in Washington
Reverend Robert Taylor, dean of St Mark's Cathedral in Seattle
The Rev Jane Gould of Massachusetts and the Rev Donald Schell of San Francisco were the remaining candidates.
The issue of gay clergy is splintering the Anglican Church.
A number of Anglican provinces have already broken with the American church, which they believe is pursuing a liberal, unbiblical agenda.
The Californian election has to be ratified at the US Church's general convention next month.
Some bishops had already suggested they would block the consecration of a second homosexual bishop in order to preserve the fragile unity of the Church, the BBC's Jane Little in Washington says.