The Boy Scouts of America has ended its ban on gay adult leaders in a move to ease a controversy that has embroiled the movement for years.

Church-sponsored Scout units, however, have been allowed to carry on excluding gays for religious reasons.

The new policy was approved by the BSA's National Executive Board by a 45-12 vote during a teleconference that was closed to the media.

"For far too long this issue has divided and distracted us," said the BSA's president, former US defence secretary Robert Gates. "Now it's time to unite behind our shared belief in the extraordinary power of Scouting to be a force for good."

But initial reactions to the decision from groups on both sides suggested the issue would remain divisive.

The Mormon church, which sponsors more Scout units that any other organisation, said it was "deeply troubled" and church officials suggested they would look into the possibility of forming their own group to replace the Boy Scouts.

"The admission of openly gay leaders is inconsistent with the doctrines of the church and what have traditionally been the values of the Boy Scouts of America," a statement from Mormon headquarters in Salt Lake City, Utah, said.

In contrast, the Human Rights Campaign, a national LGBT-rights group, said the Boy Scouts should not allow church-sponsored units to continue excluding gays.

"Discrimination should have no place in the Boy Scouts - period," said HRC president, Chad Griffin. "BSA officials should now demonstrate true leadership and begin the process of considering a full national policy of inclusion."

Mr Gates foreshadowed the action on May 21, when he told the Scouts' national meeting that the long-standing ban on participation by openly gay adults was no longer sustainable. He said the ban was likely to be the target of lawsuits that the Scouts would probably lose.

The new policy, approved unanimously by the BSA's 17-member national executive committee two weeks ago, allows local Scout units to select adult leaders without regard to sexual orientation - a stance that several Scout councils have already adopted in defiance of the official national policy.

In 2013, after heated internal debate, the BSA decided to allow openly gay youth as Scouts, but not gay adults as leaders. Several denominations that collectively sponsor close to half of all Scout units - including the Roman Catholic church, the Mormon church and the Southern Baptist Convention - have been apprehensive about ending the ban on gay adults.

The BSA's senior leaders have pledged to defend the right of any church-sponsored units to continue excluding gays as adult volunteers. But that assurance has not satisfied some conservative church leaders,'

"It's hard for me to believe, in the long term, that the Boy Scouts will allow religious groups to have the freedom to choose their own leaders," said the Rev Russell Moore, president of the Southern Baptist Convention's Ethics & Religious Liberty Commission.

"In recent years I have seen a definite cooling on the part of Baptist churches towards the Scouts. This will probably bring that cooling to a freeze."

Mr Gates, who became the BSA's president in May 2014, said at the time that he personally would have favoured ending the ban on gay adults, but opposed any further debate after the Scouts' policy-making body upheld the ban.

But in May he said that recent events "have confronted us with urgent challenges I did not foresee and which we cannot ignore".

He cited an announcement by the BSA's New York City chapter in early April that it had hired Pascal Tessier, the nation's first openly gay Eagle Scout, as a summer camp leader. Mr Gates also cited broader gay-rights developments and warned that rigidly maintaining the ban "will be the end of us as a national movement".

The BSA faced potential lawsuits in New York and other states if it continued to enforce its ban, which had been upheld by the US Supreme Court in 2000. Since then, the exclusionary policy has prompted numerous major corporations to suspend charitable donations to the Scouts, and has strained relations with some districts that cover gays in their non-discrimination codes.

Like several other major youth organisations, the Boy Scouts have experienced a membership decline in recent decades. Current membership, according to the BSA, is about 2.4 million boys and about one million adults.

After the 2013 decision to admit gay youth, some conservatives split from the BSA to form a new group, Trail Life USA, which has created its own ranks, badges and uniforms. The group claims a membership of more than 25,000 youths and adults.