SAN FRANCISCO, Calif. - An Episcopal diocese in central California voted yesterday to split with the national denomination over disagreements about the role of gays and lesbians in the church.

Clergy and lay members of the conservative Episcopal Diocese of San Joaquin voted 173-22 at their annual convention to remove all references to the national church from the diocese's constitution, said the Rev. Van McCalister, a diocesan spokesman.

The Fresno-based congregation is the first full diocese to secede because of a conservative-liberal rift that began decades ago and is now focused on whether the Bible condemns gay relationships.

"We have leadership in the Episcopal Church that has drastically and radically changed directions," McCalister said. "They have pulled the rug out from under us. They've started teaching something very different, something very new and novel, and it's impossible for us to follow a leadership that has so drastically reinvented itself."

The diocese, in a later vote, accepted an invitation to join a conservative South American congregation of the Worldwide Anglican Communion. The Episcopal Church is the U.S. member of the global Anglican Communion.

The decision is almost certain to spark a court fight over control of the diocese's multimillion-dollar real estate holdings and other assets.

The head of the U.S. denomination had warned Bishop John-David Schofield against secession. "I do not intend to threaten you, only to urge you to reconsider and draw back from this trajectory," Presiding Bishop Katharine Jefferts Schori, head of the U.S. denomination, wrote in a letter to Schofield last week.

Schofield responded that the Episcopal Church "has isolated itself from the overwhelming majority of Christendom and more specifically from the Anglican Communion by denying Biblical truth and walking apart from the historic Faith and Order."

The Fresno diocese had explored breaking ties with the American church since 2003, when Episcopalians consecrated the church's first openly gay bishop, V. Gene Robinson of New Hampshire. The resulting uproar throughout the world Anglican fellowship has moved the 77-million-member communion toward the brink of schism.

About 55 conservative Episcopal parishes have split from the church in the last few years. San Joaquin is one of four full dioceses - along with Fort Worth, Texas; Quincy, Ill., and Pittsburgh - out of 110 in the nation to take steps toward breaking with the U.S. church.