By Jonathan Kent
BBC News, Kuala Lumpur
There were surely moments in the last half century when Malaysians would not have dared dream that their country would be doing so well at 50.
Malaysia is holding celebrations to mark its independence anniversary
After all, independence in 1957 was won amidst an occasionally vicious civil war with local communists.
The 60s brought turmoil; a military stand off with Indonesia, the split in 1965 with Singapore, the race riots of 1969.
There was paranoia in the 70s, recession and political repression in the 80s, a crash and unrest in the 90s, yet here Malaysia is today and it is doing all right.
Now it is a nation of skyscrapers and microchip plants, fast highways and sprawling cities where the government talks of Malaysia's role in biotech, or conference hosting or Islamic finance.
It is almost unrecognisable from the independent Federation of Malaya of 31 August 1957 when its first Prime Minister Tunku Abdul Rahman Putra Al Haj stood tall in a specially built stadium in Kuala Lumpur and raised his right arm as the crowd echoed his three cries of "Merdeka!" - freedom.
His was a land of impenetrable jungles, small villages of wooden houses, rubber plantations and tin mines, genteel colonial cities with grand administrative buildings and rows of traditional shop-houses.
"At that time 60% of Malaysians were living in poverty, below the national poverty line," said Dr Richard Leete, head of the UN Development Programme for Malaysia, Singapore and Brunei and author of "Malaysia; from Kampung to Twin Towers".
"Over time that proportion has declined remarkably and currently there are less than 5% of people in poverty," he said.
Dr Leete knows the country well, having been seconded from the British government in 1980 to help Malaysia with its economic planning.
"[In 1957] the majority of the population were illiterate, now just a tiny fraction of Malaysia's population are unable to write," he said.
Yet despite the complete transformation of Malaysia on a physical level there is frustration that attitudes have changed less.
Prime Minister Abdullah Badawi has said time and again that while Malaysia has the "hardware", it lacks the "software" to be truly modern; in other words Malaysia builds fast highways and millions of cars but people still drive as though they are on village roads.
When Malaysians come together and act as one people success is theirs for the taking, when they are divided failure beckons
Abdullah Ahmad, formerly an MP, Malaysia's special representative at the UN and Editor in Chief of the New Straits Times Group, agrees.
"The remarkable thing is that during the 50 years of Merdeka... the Malay mindset has not changed very much," he said.
The majority Malay community has long relied on patronage; in times past from their sultans and since 1970 on government programmes aimed to help the Malays specifically.
It has bred a culture of entitlement.
The Malay majority benefit from preferential schemes
"Everything is for them, yet they are way behind the other communities because they are not seizing the opportunities," he said. Yet the affirmative action policies persist and rankle with many.
And there are other eerily familiar themes as Malaysia turns 50.
In the years before independence, there was a fierce debate about whether non-Malay immigrants should be give Malayan citizenship.
In the end they were, in return for constitutional guarantees to ensure the Malays were never marginalised in "their own country".
Now the debate has shifted and many non Malays have taken the anniversary as an opportunity to ask what place patriotism has in a country that classifies its people by race, treats them differently according to their ethnicity and then when the flags come out expects them to all cheer with equal vigour.
It seems that some are in danger of forgetting the whole lesson of Merdeka.
Unity and equality
They could be forgiven for having done so, because from the way the story of Malaysia's independence is told by some within the dominant United Malays National Organisation (UMNO), you might think the Malay community secured independence on its own; driving the perfidious British into the sea.
It is not true.
Indeed the one surviving key player from the independence struggle is not Malay at all. He is Malaysian Chinese, and he is not welcome in the land of his birth.
Chin Peng was once Malaysia's most wanted man
Chin Peng, leader of the Communist Party of Malaya, did as much as anyone to bring about Malaya's independence.
With 5-10,000 armed guerrillas he tied down tens of thousands of Commonwealth troops in a ruinously expensive war.
"If there hadn't been a boom in rubber and tin prices in the 1950s, the British wouldn't have been able to afford to fight him," said Khoo Kay Kim, emeritus Professor of History at University Malaya.
What the communists did was to focus British minds on a political settlement.
Up stepped the leaders of the Alliance, which consisted of three parties - UMNO, the Malayan Chinese Association (MCA) and the Malayan Indian Congress (MIC) - between them representing the Malay peninsula's three main races.
Early on, the British saw a unifying force with which they could do business.
The Alliance's broad appeal meant it all but swept the board in pre-independence elections in 1955. The appeal of the Communists rapidly evaporated thereafter.
"One of the things that we were concerned about was to continue in the same spirit and to perpetuate this multi-communal understanding and harmony that had come out in 1955," remembered Uma Sambanthan, widow of the then MIC leader VT Sambanthan.
Professor Khoo agreed. "Before he died, Sambanthan told me that all three parties were absolutely determined to show the British that they could work together in order to ensure they granted independence."
And the Alliance in one form or another has governed Malaysia ever since.
Then, as now, the Merdeka lesson is the same.
When Malaysians come together and act as one people success is theirs for the taking. When they are divided failure beckons.
If modern Malaysia's leaders remind themselves that unity does not come through threat, discrimination and coercion but through equality and mutual respect they may yet lay the foundations for a glorious 100th birthday.