Former secretary of defense Robert Gates. (Chris Usher/CBS News via Reuters)

Robert M. Gates, the former defense secretary last in the news for harshly critiquing President Obama’s leadership in “Duty,” his second memoir, has a new job.

He was elected Thursday as the national president of the Boy Scouts of America, the evolving and besieged organization. His ascension comes at a difficult moment for the group, which last year voted to end its ban on openly gay youth members, a decision that was met with support as well as a decline in membership.

In an interview with Scouting magazine published Thursday, Gates expressed strong support for getting rid of the ban:

Scouting: What’s your view of Scouting’s youth membership policy change?

Gates: I think it’s an important step forward, and I strongly support it. No question that it was the right thing. Now we need to turn our attention to further improving the quality of the program, getting more kids into Scouting and re-establishing our unity as a movement.

The group still bans gay adult leaders, a fact highlighted last month when a gay scoutmaster in Seattle was dismissed by the national organization.

Delegates for the group confirmed Gates during an annual meeting in Nashville, Tenn. He was elected to the organization’s national board last fall and only needed the vote Thursday to begin his two-year term as president.

Gates is also chancellor at the College of William and Mary, his alma mater, having replaced retired Supreme Court Justice Sandra Day O’Connor in the role.