In a midnight speech to about 100,000 people gathered at the historic square in the heart of Kuala Lumpur, Abdullah Ahmad Badawi, the prime minister, called Malaysians to remember and to learn from the sacrifices and hardships of their forefathers.
Abdullah said the struggle for unity was for all Malaysians.
"We must ensure that no region or community is left behind. We will hold true to the concept of justice and fairness for all citizens," he said. "We must take care of our unity."
Malays make up slightly more than half of Malaysia's 27 million people, Chinese about 25 per cent, Indians less than 10 per cent and the rest are other minorities.
As in previous years, members of the three major races came together on Friday for a state-orchestrated independence party and parade.
But observers say racial unity is slowly unravelling, caused by dissatisfaction over an affirmative action programme favouring ethnic Malays over other Malaysians.
At independence, Malays were the poorest and the most backward ethnic group in the country.
But the New Economic Policy launched in 1971 gave privileges and preferences in jobs, education, businesses, housing, bank loans and government contracts.
Ethnic Chinese and Indians were also concerned about the growing influence of Islam which they say was undermining their constitutional rights to a secular government and freedom to practice their faiths.