Ryan Andresen claims he was denied a Boy Scouts award after coming out gay.

Andresen, a longtime Boy Scout who lives near San Francisco, was denied an Eagle Scout award by his troop leader after he completed the work needed to earn it.

Andresen's mother, Karen Andresen, told Yahoo! News that her son was denied the award “because Ryan said he is gay.”

The scout said he told his scoutmaster about his sexuality before beginning work on his project, a wall-sized mural illustrating hundreds of acts of kindness.

“He had been telling me all along that we'd get by the gay thing,” Andresen said. “It was by far the biggest goal of my life. It's totally devastating.”

Deron Smith, a spokesman for the Boy Scouts, suggested the reason Andresen was denied the award was because he disagreed with the group's religious principles.

“Recently, a Scout proactively notified his unit leadership and Eagle Scout Counselor that he does not agree to Scouting's principle of 'Duty to God' and does not meet Scouting's membership standard on sexual orientation,” Smith wrote in a statement. “While the BSA did not proactively ask for this information, based on his statements and after discussion with his family he is being informed that he is no longer eligible for membership in Scouting.”

Karen Andresen denied the charge in a statement to GLAAD.

“The Boy Scouts of America's statement that Ryan does not agree to Scouting's principle of 'Duty to God' is inaccurate. … [T]he only reason he's being denied the rank of Eagle is because the Boy Scouts of America has a problem with Ryan being gay,” she said.

The Boy Scouts of America reiterated its ban on openly gay scouts and leaders in July.

(Related: Cleveland United Way approves gay protections; Could impact Boy Scouts funding.)