The national executive board of the Boy Scouts of America voted to end a ban on gay adult troop leaders and employees on Monday, finally putting to rest an issue that has served as a longtime cause of controversy within the organization.

The vote means that the national umbrella organization will no longer discriminate against employees or at facilities owned by the Boy Scouts of America. But the new policy doesn't permit local troops -- referred to by BSA as chartered organizations -- to use religious beliefs as a guide in deciding whether they will allow openly gay volunteer troop leaders.

The compromise is seen as a way to appease conservative religious groups, like the Mormon and Catholic Churches, that sponsor more than two-thirds of Boy Scout troops around the country. Churches, mosques and synagogues that sponsor troops will be able to “continue to choose adult leaders whose beliefs are consistent with their own,” the organization said in a statement.

The Boy Scouts organization has struggled to maintain membership and participation in recent decades, and the controversial ban against gay employees only opened up the organization to a host of legal troubles. The new ruling, which received support from 79 percent of the board, comes just two years after the organization lifted its ban on gay youth members.

“For far too long, this issue has divided and distracted us,” said national president and former defense secretary Robert Gates in a video message. “Now it’s time to unite behind our shared belief in the extraordinary power of scouting to be a force for good in a community and in the lives of its youth members.”

Despite the exception for religious groups, the reaction from some organizations was swift on Monday. The Mormon Church issued a statement decrying the ruling.

“The Church of Jesus Christ of Latter-Day Saints is deeply troubled by today’s vote by the Boy Scouts of America National Executive Board,” the LDS Church said in a statement. “When the leadership of the Church resumes its regular schedule of meetings in August, the century-long association with Scouting will need to be examined. The Church has always welcomed all boys to its Scouting units regardless of sexual orientation. However, 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.”

The National Catholic Committee on Scouting had a more tempered reaction in May, when Gates issued a public warning that the ban on gay adults “cannot be sustained.”

“The National Catholic Committee on Scouting (NCCS) has as its mission the constructive use of the program of the Boy Scouts of America as a viable form of youth ministry with the Catholic youth of our nation,” the organization said in a statement. “We will continue to pursue that mission until such time BSA rules conflict with Catholic teaching. That hasn’t happened yet, nor do we expect it to happen.”

The Boy Scouts has had a troubled history with gay rights. In 2000, the United States Supreme Court ruled in a 5-to-4 decision that the organization had the right to exclude homesexual leaders because oppositon to homosexuality was part of the organization's “expressive message.”

But many schools and public organizations severed their ties with the Boy Scouts after the ruling, and corporate donors began withdrawing their support. The organization faced several lawsuits that alleged discrimination.

Some experts say that the change in policy will simply move the target of lawsuits from the national level to the local one.

“It’s changing the target [of litigation] because now it will be all about the local, not the national,” said Douglas Laycock, a religious liberty scholar at the University of Virginia, told the Washington Post. “It changes the dynamic a lot. It makes it more informal, less visible.”