SALT LAKE CITY (AP) — A former Utah Supreme Court justice is expected to be named the next president of The Church of Jesus Christ of Latter-day Saints after the death of President Russell M. Nelson over the weekend.

Announcing his successor — Dallin H. Oaks — is largely a formality because the church has a well-defined leadership hierarchy that has governed it for decades. Nothing will change in the leadership body until some time after Nelson’s funeral, which is scheduled for Oct. 7.

Here’s a closer look at how the leadership structure is arranged and how new members are chosen:

Who leads the church?

The Church of Jesus Christ of Latter-day Saints, known widely as the Mormon church, is led by a president and his two top counselors, forming what is known as the First Presidency. They usually come from a governing body called the Quorum of the Twelve Apostles, which sits just below the First Presidency and helps set church policy while overseeing the faith’s business interests.

Together, these 15 top officials are all men in accordance with the church’s all-male priesthood.

How are the presidents chosen?

The longest-tenured member of the Quorum of the Twelve becomes the new president in a tradition established more than a century ago to ensure a smooth handover and prevent any lobbying internally or publicly.

The succession plan was created in 1889 following nearly two years of debate and some politicking among the apostles after the faith’s third president, John Taylor, died. Since then, the plan has been carried out without exception.

Nelson, the faith’s oldest-ever president, died Saturday at the age of 101. Per protocol, his successor won’t be formally announced until some time after his funeral next week. With his death, the First Presidency automatically dissolved and his two counselors rejoined the Quorum, bringing its number to 14.

Until a new president is announced, the Quorum, now led by Oaks, is in charge as the Utah-based faith prepares for its twice-annual general conference in Salt Lake City this weekend.

What does the president do?

He is considered a prophet, seer and revelator who leads the church through divine revelation from God along with two top counselors and members of the Quorum of the Twelve. He sets policy, interprets doctrine and manages church programs.

The president also oversees the church’s businesses, which include real estate, farms, publishing, and universities, among others. The church doesn’t disclose or discuss its finances, but its investment arm values its portfolio at $58 billion.

How long do the presidents serve?

Presidents serve until they die, which is why the length of their tenures vary widely.

The longest was Brigham Young, who served nearly 30 years. Other lengthy tenures include Heber J. Grant and David O. McKay. Nelson held the position for more than seven years.

How are the president’s two counselors chosen?

A new president usually selects counselors from the Quorum of the Twelve. If different, the previous counselors return to being members of the Quorum.

How are new Quorum members chosen?

They can come from anywhere. Most were already serving in leadership councils. The apostles tend to be older men successful in occupations outside the church.

What about women?

Nine highest-ranking women oversee organizations for women and girls within the church. The president and counselors overseeing the Relief Society are considered the top female leaders.