DALLAS — Former Defense Secretary Robert Gates was confirmed Thursday as the Boy Scouts of America’s new president, taking over one of the nation’s largest youth organizations as it fights a membership decline and debates its policy toward gays.

The group’s national council voted to approve Gates for the volunteer role at the organization’s annual meeting in Nashville, Tennessee.

Gates, 70, was announced as incoming president in October. As head of the organization’s executive board, Gates will become one of Scouting’s most public figures at a pivotal time in its history.

“I’ve had tremendous opportunities in my life, but I can say without hesitation that my memories of Scouting are every bit as vivid and meaningful as what came later,” Gates said in a statement Thursday. “I believe every boy deserves an opportunity to experience what Scouting offers.”

The Boy Scouts voted last year to allow openly gay boys in its ranks while continuing to exclude openly gay adult leaders, a compromise that continues to entangle the group in debates over its membership policy. Shortly after the change was enacted, one openly gay Boy Scout received his Eagle award, the highest in Scouting. But the organization’s expulsion of a gay Seattle-area Scoutmaster drew national headlines, and some gay-rights advocates are still urging sponsors to drop the Scouts.

The change also led some conservatives to leave Scouting altogether, though defections have been far fewer than once expected. A handful of ex-Scouts formed Trail Life USA, which touts itself as a Christian-based alternative to Scouting and has signed up hundreds of units nationwide.

As defense secretary, Gates oversaw the end of the military’s “don’t ask, don’t tell” policy excluding openly gay soldiers.