Young scouts were called upon to protest against the inclusion of openly gay boys
The Boy Scouts of America organisation has voted to welcome openly gay scouts, ending a divisive ban.
But a ban on openly gay adult scout leaders will remain in place.
More than 60% of the national council, with 1,400 voting members, supported the change at a meeting in Texas.
The campaign over the ban pitted conservatives, especially religious groups that sponsor local scouting chapters, against liberals opposed to what they deem outdated discrimination.
The change is effective on 1 January.
The resolution repealing the 22-year-old ban "reinforces that Scouting is a youth program, and any sexual conduct, whether heterosexual or homosexual, by youth of Scouting age is contrary to the virtues of Scouting," the Boy Scouts of America said in a statement.
"While people have different opinions about this policy, we can all agree that kids are better off when they are in Scouting."
The issue was put to the organisation's national board in February, but a decision was delayed until the larger council could decide.
Risking donor appeal?
"Today's vote is a significant victory for gay youth across the nation and a clear indication that the Boy Scouts ban on gay adult leaders will also inevitably end," said Rich Ferraro, spokesman for gay rights group Glaad.
But Frank Page, president of the Southern Baptist Convention executive committee, said he was saddened by the development.
"Homosexual behavior is incompatible with the principles enshrined in the Scout oath and Scout law," he said.
In the organisation's 1911 Scouts oath, members pledge: "On my honor I will do my best…. to keep myself physically strong, mentally alert and morally straight."
Some within the scouting movement were concerned conservative and religious groups would withdraw financial support if the ban were lifted.
But many liberal groups also hoped the ban on gay adult leaders would go, finding it absurd that openly gay teenage scouts would have to leave the organisation upon reaching adulthood.
The Boy Scouts of America, founded in 1910, has about 2.6 million young members, down from a peak of around 4 million, and about 1 million adult leaders and volunteers.
As recently as July 2012, the Boy Scouts concluded that its long-standing ban on gay scouts was "the best policy for the organisation".
In 2000, the organisation went to the US Supreme Court, saying its policy of "morally straight" conduct fell within its right to freedom of expression.