“The solution that we received is a welcome relief to the conflict we have been experiencing,” said the Rev. Tom Berlin, who represented groups that opposed discrimination against L.G.B.T. people in the mediation. “I am very encouraged that the United Methodist Church found a way to offer a resolution to a long conflict.”

Conservatives, who seemed to have the upper hand after the vote tightening a ban on same-sex marriage, would get $25 million once their new denomination is formed and incorporated. All current clergy and lay employees of the denomination, even if they affiliate with the traditionalists, will get to keep their pension plans.

“It is not everything that we would have hoped for, but we think it is a good agreement that gets us out of the decades-long conflict that we have experienced and enables us to focus on ministry in a positive way,” said Tom Lambrecht, vice president of Good News, one of the conservative groups.

The factions agreed to allocate $39 million to support “communities historically marginalized by the sin of racism,” according to the agreement. That sum includes $13 million the traditionalists contributed instead of receiving as part of their portion.

Despite the deep doctrinal disputes that led to the split, the negotiations were “largely secular: process, governance, finances,” said Kenneth R. Feinberg, the lawyer who helped craft the thorny settlements that arose from the 2010 BP oil spill and the Sept. 11 terrorist attacks.

“I’m the last person in the world who’s going to help the parties resolve their doctrinal differences,” said Mr. Feinberg, who assisted in the church’s mediation on a pro bono basis.

Local churches will choose whether to join any new traditionalist denomination or remain in the United Methodist Church. Several people interviewed on Friday believed that most American churches would stay, though there has not been any formal survey.