In his lifetime, Sultan Azlan Muhibbuddin Shah was Malaysia's ninth Yang di-Pertuan Agong, the Sultan of Perak for three decades and the head of the country's judiciary.
In all these positions, he left an indelible mark. But for many, he will be best remembered as the Chief Justice of the High Court of Malaya and later, the Lord President (now known as the Chief Justice).
"His Royal Highness was a great judicial luminary in his time and the annals of our judicial history will bear testimony to this," said Christopher Leong, president of the Malaysian Bar.
"He was well respected not only in Malaysia but also in the Commonwealth."
Sultan Azlan Shah's judgments were already legendary.
"He was master of the language," said Datuk Dr Shad Saleem Faruqi, Emeritus Professor of Law at Universiti Teknologi Mara.
"He wrote judgments that were clear, beautiful and passionate. He extended the horizons of the rule of law and constitutionalism."
A judgment often quoted is Pengarah Tanah dan Galian, Wilayah Persekutuan v Sri Lembah Enterprises Sdn Bhd, in which he wrote, "Every legal power must have legal limits, otherwise there is dictatorship."
The Sultan had a great impact on the judiciary.
Former Court of Appeal judge Datuk Shaik Daud Mohd Ismail recalled that during the Annual Conference of Council of Judges, "he told us to write judgments very quickly after a case and not dilly-dally, and not to waste time postponing cases. He was very strict on that."
Looking back to the events after the 2008 general election, Shad Saleem said the Sultan had not been given adequate credit.
"The Perak state assembly was deeply split and no single party had a majority. The Sultan had a fair margin of discretion."
Barisan Nasional did not have a majority although it was the largest group, the professor noted.
Although the loose opposition coalition was not formally a coalition, the Sultan sided with democracy and concluded that it had the majority.
"It was a principled, brave decision."
During the constitutional crisis in the state the following year, the Pakatan Rakyat government lost its majority.
"The main contention was whether the vote of confidence must be determined on the floor of the state assembly or if it could be done elsewhere," said Shad Saleem.
"Commonwealth precedents are split down the line on this."
The Sultan had been asked to dissolve the assembly although there was a group willing and capable of forming the majority, he noted.
"He sided with the majority. It was surely controversial, but based on sound jurisprudence."
Overall, no other king had higher qualifications or such an intellectual and academic track record, said Shad Saleem, who reckoned it a credit to Malaysia that a philosopher could be a King.
"He had held the highest judicial post and destiny gave him the chance to be a Sultan and later King. He was at the pinnacle of two totally separate 'professions' and was a credit to both."