By REUTERS JULY 27, 2015, 8:13 P.M. E.D.

DALLAS — The Boy Scouts of America on Monday ended the group’s outright ban on openly gay adult leaders and employees, rolling back a policy that has deeply divided the membership of the 105-year-old Texas-based organization.

The new policy, which takes effect immediately, comes three years after the organization removed its prohibition on gay youth but will still allow local Boy Scout units chartered by religious organizations to make their own choices regarding gay adult leaders.

The Boy Scouts said the latest resolution, unanimously adopted by the organization’s executive committee on July 13, gained final approval by the National Executive Board, with 79 percent of board members present voting to support it.

The executive committee had urged an end to the ban because of “sea change in the law with respect to gay rights.”

The decision follows the landmark ruling in late June by the U.S. Supreme Court legalizing same-sex marriages nationwide. In May, the Boy Scouts’ president, former U.S. Defense Secretary Robert Gates, called the blanket ban on gay Scout leaders “unsustainable” and said it needed to change.