(Reuters) - The United Methodist Church plans to split into two later this year, church officials said on Friday, a schism that follows years of contention over whether the church should end its ban on same-sex marriage and gay clergy.

The plan, if approved at the church’s worldwide conference in Minneapolis in May, would divide the third-largest U.S. Christian denomination into two branches: A traditionalist side opposed to gay marriage and the ordination of lesbian, gay, bisexual and transgender clergy, and a progressive wing that will allow same-sex marriage and LGBT clergy.

The split would affect the denomination globally, church leaders said. The United Methodist Church lists more than 13 million members in the United States and 80 million worldwide.

The U.S. Supreme Court legalized same-sex marriage throughout the nation in 2015, but that decision applies only to civil, not religious, services. Some denominations, including the Episcopal Church and certain branches of Judaism, have sanctified same-sex unions, while others including the Roman Catholic Church and Southern Baptist Convention, have declined to do so.

A council of Methodist bishops in Washington called Friday’s move the “best means to resolve our differences.”

A meeting held last February on the issue failed to come up with a solution that satisfied the conservative and liberal wings of the church.

Church leaders from both camps said they welcomed the move.

“While we regret that it has come to this, we believe this gives us a path forward that honors the dignity of all people,” said Reverend Junius Dotson, a leader in UMCNext, a liberal group within the church that favors gay rights. “We want to reform the current United Methodist Church.”

Reverend Keith Boyette, president of the conservative Wesleyan Covenant Association, sounded a similar note.

“I think this is good news, as the potential agreement can end years of conflict and allows us a way to stay true to our values without this continuous battle,” he said.

Last month, Grace Fellowship UMC of the Houston suburb of Katy, Texas, with about 2,800 members, voted to leave the denomination over the church’s debate over same-sex unions and gay clergy, opting to remain conservative and oppose such marriages.

The new plan comes at a time when newly adopted sanctions were set to go into effect to more strictly punish church pastors who perform same-sex weddings, with sanctions that would include a year’s suspension up to removal from the clergy.