The Boy Scouts of America is expected on Monday to end its blanket ban on gay leaders — a turning point for an organization that has been in turmoil over the issue.

But some scouting groups will still be able to limit leadership jobs to heterosexuals.

To gain the acquiescence of conservative religious groups that sponsor many packs and troops, like the Mormon and Roman Catholic Churches, the policy will allow church-run units to pick leaders who agree with their moral precepts.

“There are differences of opinion, and we need to be respectful of them,” said Michael Harrison, a businessman who led the Boy Scouts in Orange County, Calif., and lobbied internally for change. “It doesn’t mean the Mormons have to pick a gay scoutmaster, but please don’t tell the Unitarians they can’t.”

Already struggling to reverse a long-term decline in membership, the Boy Scouts have been increasingly consumed over the last two decades by battles over the exclusion of gay people that threatened to fracture the organization. Conservative partners saw the policy as a bulwark against unwanted social change, but the anti-gay stance was costing the Boy Scouts public support and cachet as well as corporate funders, and lately had brought the threat of costly lawsuits.