The president of the Boy Scouts of America on Thursday called for an end to the group’s blanket ban on gay adult leaders, warning Scout executives that “we must deal with the world as it is, not as we might wish it to be,” and that “any other alternative will be the end of us as a national movement.”

At the same time, religious organizations that sponsor a majority of local Scout troops, including the Mormons and Roman Catholics, should remain free to set their own policies for leaders, said the president, Robert M. Gates, the former director of the CIA and the former secretary of defense.

Gates called for the changes at an annual national meeting of the group, in Atlanta. He said that he was not yet making a formal proposal but that the Scouts’ governing body should take up the issue formally at a future meeting.

The treatment of gay men and boys has been a source of wrenching debate over the past decade. Conservative religious groups that sponsor many Scout troops have opposed the participation of openly gay members while local leaders in more liberal areas have called for an end to the ban.

In 2013, Boy Scout leaders from across the country voted, with more than 60 percent approval, to say that no youth may be denied membership “on the basis of sexual orientation or preference alone.” But it left intact the policy that no openly gay adults could serve in the organization.

Gates said in his prepared remarks Thursday, released by the Boy Scouts, that the national leadership would take no action against defiant local councils.

At the same time, he said that in the name of religious freedom, the Scouts should allow local sponsoring organizations “to determine the standards for their Scout leaders.”

Zach Wahls, the executive director of Scouts for Equality, a group that has campaigned for change, praised Gates for the speech.

“Dr. Gates has built his reputation on straight talk and tough decisions, and I’m glad he’s fully endorsing a re-evaluation of the Boy Scouts’ ban on gay adults,” Wahls said in a statement. “It seems like the Boy Scouts will continue an internal dialogue about the subject and that a change within the next year or two is imminent.”