By Celine Fernandez And James Hookway
KUALA LUMPUR, Malaysia--Malaysians were met with the unprecedented spectacle of the man who ran the country for 23 years joining a weekend-long protest against current leader Prime Minister Najib Razak's management of the economy and debt problems at a state investment fund.
Mahathir Mohamad, now 90 years old, briefly appeared at the rally in central Kuala Lumpur on Saturday evening and again on Sunday afternoon, joining tens of thousands of people who had taken to the streets after it emerged last month that nearly $700 million allegedly passed into the accounts of Mr. Najib before the last general elections in 2013.
Dr. Mahathir, who has long sought to remove Mr. Najib as prime minister and head of the ruling United Malays National Organization, said his message for the prime minister was: "That the people do not like him; that the people want him to step down. I want Najib to step down."
He also drew parallels with the mass domestic protests that toppled the Philippines' late dictator Ferdinand Marcos in 1986, saying that "a street demonstration is our last option."
Other demonstrators at the protest, which organizers named "Bersih" for the Malay word for "clean", chanted for Mr. Najib's resignation and demanded an end to new consumption taxes and other economic measures.
Political analysts, however, said that while the protesters appeared emboldened by Dr. Mahathir's support, the fact that authorities allowed the protest to proceed reflected the likelihood that Mr. Najib will be able to keep control of the resource-rich country if he can retain the support of UMNO and prevent a steeper slide in the value of Malaysia's ringgit, which has been among Asia's worst-performing currencies this year, losing about 16% of its value against the dollar.
"The Bersih protest itself isn't going to change anything," said James Chin, a Malaysian academic who heads the Asia Institute at the University of Tasmania in Australia and who was in Kuala Lumpur to observe developments. "Unless there is a full-scale riot, he is still in a strong position."
Keeping UMNO on board, however, is still a considerable challenge, Mr. Chin and other analysts say. The party has ruled Malaysia since independence from Britain in 1957. But cracks in the organization are growing, with Dr. Mahathir's faction becoming increasingly vocal in recent weeks.
The Wall Street Journal reported last month that Malaysian investigators had traced hundreds of millions of dollars of deposits into what they believed were Mr. Najib's personal bank accounts after the movement of cash among agencies, banks and companies linked to state investment firm 1Malaysia Development Berhad, or 1MDB. Mr. Najib is head of the advisory board of 1MDB, which has acquired debts of about $11 billion since Mr. Najib established it shortly after becoming prime minister in 2009.
The Journal reported that the original source of the money was unclear and that the government investigation hadn't detailed what happened to the money that allegedly went into Mr. Najib's personal accounts. Mr. Najib has denied any wrongdoing or taking money for personal gain. The country's antigraft agency said the money in Mr. Najib's account was a donor contribution that originated from the Middle East. The donor wasn't specified.
In late July, Mr. Najib fired then-deputy premier Muhyiddin Yassin after Mr. Muhyiddin called on Mr. Najib to explain the worsening situation at 1MDB. Mr. Najib also promoted four members of a parliamentary committee investigating 1MDB to the cabinet, meaning they could no longer stay on the panel. The following day, he replaced the country's attorney general, who was also involved in an investigation into 1MDB, ahead of his scheduled retirement date in October.
Swiss authorities, meanwhile, this month said that they have opened a criminal probe into the relationship between what they called "suspicious transactions" in Switzerland's banking sector and 1MDB. The investment fund said it is ready to assist in any investigation.
The issue has created a political firestorm in Malaysia, but political analysts note that opposition to Mr. Najib's rule has become badly fragmented along racial lines after its most influential leader, Anwar Ibrahim, was convicted and sentenced to five years in prison on a sodomy charge this year.
A firebrand speaker and member of Malaysia's majority ethnic-Malay Muslim population, Mr. Anwar was widely viewed as one of the few politicians able to unite the country's disparate opposition parties, which range from the predominantly ethnic-Chinese Democratic Action Party to the Pan-Malaysian Islamic Party, or PAS. Since the Anwar verdict, which Mr. Anwar denounced as a political plot, the DAP and PAS have broken off their political alliance.
Indeed, analysts and people at the rally noted that while there were sizable numbers of Malays in the crowd, the participants overwhelmingly came from Malaysia's minority Chinese community after PAS decided not to take part. A poll taken by the Kuala Lumpur-based Merdeka Center showed that 81% of ethnic Chinese polled supported the Bersih protest, while 70% of Malays opposed it.
Protest organizers said the number of Malay participants in the weekend protest was comparable with those of earlier antigovernment demonstrations.
Still, "Mr. Najib can turn this rally to his advantage by pointing to a sea of Chinese faces," Mr. Chin said. He also said he could choose to portray Dr. Mahathir as disloyal to UMNO.
There are signs that this might already be happening. State media agency Bernama on Saturday reported Mr. Najib as saying the protesters are "shallow and poor in their patriotism and love for their motherland" for holding the demonstration so close to the country's independence day on Monday. "Don't they understand the country was built on the blood and sweat of our freedom fighters?"
Write to Celine Fernandez at Celine.Fernandez@wsj.com and James Hookway at firstname.lastname@example.org