Courtesy of GLAAD Jennifer Tyrrell, right, addresses the media with her partner after delivering 300,000 signatures to the Boy Scouts of America headquarters in Dallas, Tex., on July 18. Activists stepped up their campaign to change the policy after Tyrrell was removed from her post as den leader of her son's Tiger Cubs' pack.

President Barack Obama opposes a controversial Boy Scouts' policy banning gay Scouts and leaders, the White House said Wednesday.

White House spokesman Shin Inouye said in a statement that Obama believes the Boy Scouts of America has helped to educate and build character in boys. “He also opposes discrimination in all forms, and as such opposes this policy that discriminates on basis of sexual orientation,” according to the statement, which was first reported by the Washington Blade.

The comments come three weeks after the Boy Scouts, a private organization, said it would keep the policy following a nearly two-year confidential review of it that began in 2010.

“The Boy Scouts of America respects the opinions of President Obama and appreciates his recognition that Scouting is a valuable organization," BSA spokesman Deron Smith said in an email to NBC News. "We believe that good people can personally disagree on this topic and still work together to accomplish the common good.”

When asked if any sitting U.S. president had ever expressed opposition to the policy, Smith said he didn’t know. “This is not a focus of our program and we do not have an agenda on these issues.”

The organization has no plans to revisit the policy, he has previously said.

Eagle Scouts return badges to protest policy banning gays

Eagle Scouts divided over protest against ban on gays

Boy Scouts: We're keeping policy banning gays

Eagle Scout son of lesbian moms: Boys Scouts must end gay discrimination

Republican presidential candidate Mitt Romney is also opposed to the policy. In 1994, he addressed it in a debate, and a Romney spokeswoman recently confirmed that this was still his position, The Associated Press reported.

"I support the right of the Boy Scouts of America to decide what it wants to do on that issue. I feel that all people should be able to participate in the Boy Scouts regardless of their sexual orientation," Romney said in 1994.

Activist groups in recent months have stepped up their campaign to end the membership policy banning gays after Jennifer Tyrrell, den leader of her son’s Tiger Cub pack in Bridgeport, Ohio, was removed from her post in April because she is a lesbian.

Tyrrell started an online petition calling for an end to the ban. In May, Zach Wahls, an Eagle Scout who is the son of a lesbian couple, delivered some of the signatures to the Boy Scouts. Tyrrell did the same in early July.

After the Boy Scouts announced they were keeping the policy, dozens of Eagle Scouts said in online postings that they had returned their badges, medals and other regalia to the organization in protest.

The announcement of Obama's opposition to the policy comes after he said in May that he supported same-sex marriage, becoming the first U.S. president to do so.

If you are a current or former member of the Boy Scouts and would like to share your thoughts on the membership policy, you can email the reporter at miranda.leitsinger@msnbc.com

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook