Kuala Lumpur, Malaysia - Malaysia's Conference of Rulers will meet on Thursday to decide which one of the country's nine sultans will become its next head of state, known as Yang di-Pertuan Agong, for the next five years following the sudden resignation of Sultan Muhammad V earlier this month.

The new agong is expected to be installed on January 31.

Whoever is chosen as the new ruler will take the throne as the coalition government of Prime Minister Mahathir Mohamad, who took office after an unprecedented change of power in May's election, attempts to push through promises of institutional and democratic reforms.

Analysts say the monarchy's symbolic importance, especially for the country's majority Malays, could help smooth the process of change. Malaysia also has sizeable populations of ethnic Chinese, Indian and indigenous people.

Muhammad V, who remains the sultan of the northeastern state of Kelantan and was on medical leave in the two months leading up to his departure, is the first ruler to step down before the end of his five-year term.

He oversaw May's historic change in government and used his powers to pardon prominent politician Anwar Ibrahim who had been jailed a second time for sodomy in what he said were politically-motivated charges.

Why the rotational system?

The Yang di-Pertuan Agong translates roughly as "King of Kings" and the country's royal households take it in turns to hold the position under a system that was agreed in 1957, when what was then Malaya secured independence from Britain.

Each of the sultans spends five years on the throne as head of state and commander-in-chief of the armed forces.

"From 1874, as the British brought the Malay states under colonial rule, rather than abolish the monarchy state by state, they found it more effective to ensure that the royal families continued to have a place in the system that they created," Amrita Malhi, a visiting fellow at the Coral Bell School of Asia Pacific Affairs at the Australian National University in Canberra, told Al Jazeera.

"When these states were brought together in the Federation, and later, when Malaya achieved its independence, all these separate monarchies had their place preserved."

The first to become agong in the newly independent country was Tuanku Abdul Rahman Almarhum Tuanku Muhammad from the central state of Negri Sembilan, who studied law in the UK and was a qualified barrister. His face still appears on Malaysian bank notes.

"The idea was that none of them would be superior to the other," said Lim Wei Jiet, a constitutional lawyer.

The rulers of the other states followed according to a list based on seniority decided by the sultans of the time.

How is the agong 'elected'?

Even with the list, the agong must go through a process of appointment.

The governors of Melaka, Penang, Sabah and Sarawak - the states without royal households - have no role in choosing the agong even though they are members of the Conference of Rulers. The decision is for the sultans alone.

Although the appointment of the new agong is referred to as an "election", the sultans have tended to stick with the established order.

"Over the past 60 years, they have been very respectful of this rotational system," Lim said.

Each sultan is given an unnumbered ballot paper and an identical pen, and asked whether they think the first royal on the list is a suitable or unsuitable choice for agong.

If the first name fails to get at least five votes, or that person decides he does not want the job, the sultans then go through the same process with the next name on the list until a ruler is chosen.

They can also decide a sultan is unsuitable to be ruler for reasons including poor health.

The next state in line for the throne is thought to be Pahang where the regent, Tengku Abdullah Sultan Ahmad Shah, was proclaimed as the sixth sultan just over a week ago, replacing his 88-year-old father.

After Pahang, the royal households of Johor and Perak are thought to be next in line.

What powers does the royalty have?

For many Malays, especially in the rural areas, royalty remains a potent symbol of identity and what it means to be Malay. Sultans are the guardians of Islam in their own states, while the agong is also the protector of the religion in states where there is no hereditary monarch.

"We are a feudal society," said Dina Zaman, director of Malaysian think-tank IMAN Research. "The significance of the sultans is that they represent the Malays. They don't really play a powerful role but visually and figuratively they do represent a community and a faith."

As a constitutional monarch, the agong also oversees key political and judicial appointments.

When Sultan Muhammad V stepped down, some people took to policing social media, looking for comments they claimed had "insulted" the ruler. Police arrested three people under the colonial-era Sedition Act for allegedly mocking the agong, but they have not been charged and, unlike Thailand, there is no law on lese-majeste.

Mahathir, 93, himself has no qualms about criticising the sultans.

When he was last in power between 1981 and 2003, he withdrew their right to veto state and federal legislation, and reduced their legal immunity.

"Mahathir successfully downsized the royal power and he still has an upper hand in his dealings with them," said Wong Chin Huat, a political scientist at Penang Institute.

In 2017, Mahathir returned the honours that the sultan of Selangor had awarded him and his wife decades earlier after the ruler of Malaysia's richest state called comments he had made about the Bugis - the ethnic origin claimed by scandal-plagued former Prime Minister Najib Razak - "divisive".

Criticism from the sultan of Johor that the veteran politician was "playing the politics of fear and race" after questioning mainland China investments in Malaysia also got short shrift.

But lately there have been more conciliatory signs - after their first meeting last week, the sultan of Johor was filmed driving Mahathir to the airport in an original model Proton Saga, widely described as the first Malaysian car.

"Mahathir is trying to create a whole new way of government; a 'new' Malaysia," said Serina Abdul Rahman, who researches the Southeast Asian country at the ISEAS-Yusof Ishak Institute in Singapore. "I think he would want to be more careful. He campaigned on better institutions, more checks and balances and less corruption and he can't risk jeopardising all of that."

How are the royal households funded?

The agong and his consort are paid from the public purse under the Civil List Act 1982, but many royal families also operate their own businesses.

The agong receives nearly 1.1 million ringgit ($266,571) a year while the consort, the Raja Permaisuri Agong, gets 196,872 ringgit ($47,628).

A further 3.8m ringgit is set aside to pay for the costs of running the palace, including its staff.

After independence, the agong lived in a 1920s villa near the centre of Kuala Lumpur that had been built for a wealthy tycoon.

In 2011, the head of state moved to a new 22-domed palace in Kuala Lumpur's inner western suburbs.