KUALA LUMPUR, Malaysia — The accounts of corruption are staggering: at least $3.5 billion stolen from a government fund and spent on expensive real estate, jewelry and art, with $731 million ending up in the personal accounts of the prime minister, Najib Razak.

Malaysians were so enraged that they threw out Mr. Najib in national elections this week, the first time the governing party has lost power since independence more than 60 years ago.

In his place, voters turned to a familiar face, Mahathir Mohamad, a 92-year-old former prime minister who had teamed up in an unlikely alliance with his political opponents, some of whom he had jailed.

Mr. Mahathir was sworn in on Thursday as the new prime minister — the world’s oldest elected head of government — promising to fight corruption, prosecute Mr. Najib and unite this diverse nation of 31 million people.