[Updated at 5:50 p.m. ET]

A longtime Boy Scout claims he's being denied the organization's highest honor because he's gay.

Ryan Andresen, who lives near San Francisco, recently finished an extensive service project needed to earn his Eagle Scout award, but his troop leader refuses to give him the rank.

"He said he can't because Ryan said he is gay," said Karen Andresen, the scout's mother.

Ryan claims the scoutmaster knew about his sexual orientation well before he started the project and paperwork for the honor.

"He had been telling me all along that we'd get by the gay thing," Ryan told Yahoo News. "It was by far the biggest goal of my life. It's totally devastating."

The scoutmaster of Troop 212 in Moraga, Calif., did not immediately return phone and email messages seeking comment.

-->

The Scouts' national spokesman, Deron Smith, said late Thursday that Ryan contributed to his situation by disagreeing with the BSA'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 to Yahoo News. "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."

Smith said belief in God is the foundation of scouting's strong, continuing commitment to encouraging moral, ethical and spiritual growth. It is the position of the Boy Scouts of America that no one can reach their full potential without belief in a higher power.

In July, Boy Scouts of America national leaders emphatically reaffirmed its policy of excluding gays— preserving a controversial policy that was upheld by the U.S. Supreme Court in 2000.

The decision has sparked an intense public debate. Companies and organizations have canceled annual donations, and nearly 300 Eagles have reportedly returned their medals in protest. (More than two million Eagle Scout medals have been earned since 1911.)

Story continues

Eagle Scout Zach Wahls launched the website Scouts for Equality this summer. He said Ryan's case is unique, because many gay scouts are forced out before they get a chance to earn an Eagle badge.

"He is a case study of the detrimental effects this policy has on young men," Wahls said.

While the national organization's exclusion applies to adult leaders and scouts, some local chapters have rejected the policy.

Ryan's mother started a petition on Change.org two days ago to try to convince her son's scoutmaster to hurry and reverse his decision. Under Scout rules, Ryan must earn his Eagle badge by his 18th birthday, which is Monday.

"It hurts me so much to watch Ryan suffer for being who he is, because to me, he's perfect," she wrote on the website. "Ryan has worked for nearly 12 years to become an Eagle Scout, and nothing would make him more proud than earning that well-deserved distinction."

More than 50,000 people had signed the petition as of Thursday afternoon.

Karen Andresen said her son, who joined when he was 6, put in extra hours to finish the Eagle requirements.

"He scrambled to get that service project done," she said. "He was so close and he had worked so hard."

For his project, Ryan built an anti-bullying Tolerance Wall at his local middle school. With the help of students, he amassed a mosaic from 288 ceramic tiles illustrating acts of kindness.

Ryan said he believes the scoutmaster was influenced by veteran leaders above him.

"I'm so disappointed and confused," he said. "I know he isn't a person who hates gay people, but I never thought he would do something like this."

"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. 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."