As Dr Mahathir Mohamad steps down as Asia's longest serving leader, the political battleground in his newly modernised Malaysia has switched from one of race and class, to one of religion.
And it is a battle his chosen successor may find has already been lost - to an opposition party calling for an Islamic state.
Dr Mahathir began his political career as a strident nationalist and rabble-rousing "man of the people", espousing policies which discriminated against the country's ethnic Chinese and Indians in favour of the country's indigenous, mainly rural, Malays.
But his 22-year reign as prime minister ends on Friday, with many Chinese and Indians wishing he would stay on and many Malays accusing him of abandoning his Muslim principles.
Tracing Dr Mahathir's political roots this week, I visited his homeland in the northern rice growing state of Kedah.
The house where he was born 78 years ago is now a museum.
A handful of visitors, a cross-section of Malaysia's different races, were divided in their judgements - but not along the lines I had expected.
Dr Mahathir began his professional life as a doctor in a small rural area
"He is a good leader. We are sorry to see him go," said a Chinese couple as they gazed at a framed copy of young Mohamad's school report, showing, by the way, that the boy who later lambasted colonialism, once got a credit in "History of the British Empire".
"I am not sorry, no. It is time he went," said a young Malay women, her head covered in the traditional Islamic shawl.
Being a doctor in a poor rural area (rather than a foreign-educated aristocrat like previous leaders), helped shape Dr Mahathir's political agenda, says Johan Saravanamuttu, a political scientist at Universiti Sains Malaysia.
"He was a populist. He wanted to represent the people on the ground".
But at the same time as calling for radical action to help the Malays, the young Dr Mahathir wrote disparagingly about them in his controversial book, 'The Malay Dilemma.'
"He talks in the book about inbreeding among the Malays and says that's partly the reason for them being such poor performers and achievers. It was a question of marrying the village idiot off with the next village idiot," Professor Johan said.
"He told them they had to escape from this morass. I think it was the doctor in him that wanted to find a social engineering tool to get them out of their dilemma."
Dr Mahathir's prescription?
A major dose of modernisation - and an "affirmative action" programme that gave Malays a guaranteed share of educational and other opportunities, and a stake in every company.
The results have been dramatic:
Incomes have tripled and poverty levels have fallen to 5% of all households, from more than 35% in 1982.
Two thirds of the population now live in cities.
The share of national wealth held by Malays has risen from 9% to more than 20%.
The island of Penang, which once produced only rubber, palm oil and tin, is today the biggest exporter of hard drives and memory chips in the world.
Dr Mahathir has become the all-powerful figurehead of a new, confident, middle-class nation.
He is hailed by many as a folk hero, who has put Malaysia on the world map.
Dr Mahathir wanted Islam to thrive in a modern setting
Most people here tolerate, or even support, his maverick outbursts on the international stage.
Many are even prepared to forgive him for his "crony capitalism" and his cowing of the press and the courts.
But the man who in the past few weeks has so angered the world's Jews, may be regretting the day he first stoked the fires of political Islam in his own country.
Having barely even mentioned religion when he wrote 'The Malay Dilemma,' Dr Mahathir began what was known as the Islamicisation process, after he became prime minister, in an effort to ward off the challenge of PAS, the main Islamic opposition party.
Anwar Ibrahim, the radical leader of an Islamic youth movement affiliated with PAS, was co-opted by the ruling party, Umno, in the late 1980s, and before long had risen to become Deputy Premier.
But then Dr Mahathir turned savagely on his handpicked heir apparent.
In 1998 Anwar was dismissed from the cabinet, expelled from the party and accused of corruption and sodomy.
He is still serving the resulting jail sentences.
The action taken against Anwar was entirely due to his political threat to Dr Mahathir, according to Nasharuddin Mat Isa, Secretary-General of PAS.
"Anwar was very popular. To me, should there be any accusation, you should bring evidence and prove it, make it public...but till today the whole process is still very vague."
He said the Anwar affair turned out to the political benefit of PAS, helping it to pick up new seats at the last general election in 1999.
Overall it won about 60% of Malay Muslim votes.
He thinks his party will win more seats at the next general election, which is due within the next year and is expected by some observers as soon as December.
Which side truly represents Islam - the government or the main opposition party - is now the main issue in Malaysian politics.
Dr Mahathir recently claimed the high ground by denying that he was a "moderate" Muslim leader.
He went back to the fundamental teaching of Islam, he said, whereas PAS was using and abusing religion for political purposes.
This is hotly disputed by Nasharuddin.
"Our understanding of fundamental is applying the teachings of the Koran. After 46 years of independence, there is not much sign of these teachings being applied in Malaysia. When we tried to bring Islamic law into the two states we won at the last election, the resistance from Dr Mahathir was much greater than that from non-Muslims".
But there is little doubt that the non-Muslim Chinese and Tamil communities - as well as foreign investors - regard the possibility of Islamic law throughout Malaysia with deep dismay.
They are therefore the ones who are sorry to see Dr Mahathir go. They believe he is better equipped than his successor, Abdullah Badawi, to stand up to the growing challenge from PAS.