Robert M. Gates, the president of the Boy Scouts of America and former secretary of defense, called on Thursday to end the Scouts’ ban on gay adult leaders, warning the group’s executives that “we must deal with the world as it is, not as we might wish it to be.”

Speaking at the Boy Scouts’ annual national meeting in Atlanta, Mr. Gates said cascading events — including potential employment discrimination lawsuits and the impending Supreme Court decision on same-sex marriage, as well as mounting internal dissent over the exclusionary policy — had led him to conclude that the current rules “cannot be sustained.”

If the Boy Scouts do not change on their own, he said, the courts are likely to force them to, and “we must all understand that this will probably happen sooner rather than later.”

In a nod to the religious organizations that sponsor a majority of local Scout troops, he said they should remain free to set their own guidelines for leaders. “I support a policy that accepts and respects our different perspectives and beliefs,” he said, adding, “I truly fear that any other alternative will be the end of us as a national movement.”