SALT LAKE CITY (AP) — The Mormon church said Tuesday it will sever all ties with the Boy Scouts of America at the end of next year and place its remaining 425,000 boys into a gospel-focused youth program it is developing. The move ends a nearly century-old relationship that was based on their shared values.

The announcement by The Church of Jesus Christ of Latter-day Saints and Boy Scouts didn't come as a complete surprise after the religion last year removed 185,000 boys between the ages of 14 and 18, signaling that an end to the long-time alliance was near.

Joining the Boy Scouts is practically automatic among Mormon boys, and the religion has long been the biggest sponsor of Boy Scout troops in the United States. The Mormon boys who will be leaving represent about 18.5 percent of the 2.3 million youth in the organization.

The Mormon church said in a statement that the move is about creating its own youth program that it can use for its increasingly global membership, but the two organizations' values clearly have been diverging in recent years.

The Boy Scouts decided in 2015 to allow gay troop leaders and announced last year it would allow girls in its ranks. Last week, the organization said it will change the name of its flagship program next year to Scouts BSA to account for the inclusion of girls.

Like other conservative faiths, the Mormon church opposes gay marriage and teaches that being in a homosexual relationship is a sin. The church initially said it was "deeply troubled" by the Boy Scouts' policy change on gays but stayed with the organization after receiving assurances it could appoint troop leaders according to its own religious and moral values.

The religion has also traditionally used separate youth programs for boys and girls.

The Mormon church said in a statement the new program that will start in 2020 will "help all girls and boys, young women and young men discover their eternal identity, build character and resilience, develop life skills and fulfill their divine roles as daughters and sons of God."

The still to be developed program that will likely include outdoor activities and character building similar to Boy Scouts, but it won't be modeled after Boy Scouts or use ranks. The 14-to-18-year-old boys that left the Boy Scouts already focus on church-related activities and community service.

More than half of the church's 16 million members live outside the U.S. and Canada.

The Boy Scouts of America in a statement thanked the thousands of Mormons who have served as scout leaders and wished the religion well on its new program. The organization said individual Mormons who wish to stay in Boy Scouts would be integrated into other troops.

The Boy Scouts' move to allow girls, announced last October, marked the organization's latest momentous policy shift.

The organization already has started allowing girls into the Cub Scouts. So far, nearly 4,000 girls have joined roughly 170 Cub Scout packs participating in the first phase of the new policy, and the pace is expected to intensify this summer under a nationwide multimedia recruitment campaign titled "Scout Me In."

Though the flagship program's name is changing, the parent organization will remain the Boy Scouts of America, and the Cub Scouts — its program serving children from kindergarten through fifth grade — will keep its title, as well.

The Boy Scout movement had been entrenched in Mormon culture for as long as anyone can remember.

In 2013, the church put on an extravagant theatrical production inside its 21,000-seat auditorium in Salt Lake City to commemorate the 100th anniversary of its alliance with the Boy Scouts.

A Boy Scout training complex in West Virginia is named after former Mormon church President Thomas S. Monson, a longtime member of the Boy Scouts' executive board and a major supporter who died earlier this year.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.