Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SALT LAKE CITY — The Mormon church — the nation's largest sponsor of Boy Scout units — is keeping its longtime affiliation with the organization despite its decision to allow gay troop leaders.

The Church of Jesus Christ of Latter-day Saints announced the decision Wednesday in a news release. Church leaders decided to stay with Boy Scouts after getting assurances they can appoint troop leaders according to their own religious and moral values.

Cub Scouts and Boy Scouts prepare to lead marchers while waving flags at the 41st annual Pride Parade Sunday, June 28, 2015, in Seattle. A large turnout was expected for gay pride parades across the U.S. following the landmark Supreme Court ruling that said gay couples can marry anywhere in the country. Elaine Thompson / AP

Boy Scouts of America announced on July 28 it would lift its ban on gay adult leaders while allowing church-sponsored Scout units to continue excluding gay adults.

The Mormon religion, with 15 million members, has softened its tone on gays in recent years but still opposes gay marriage and believes homosexual activity is a sin.