KUALA LUMPUR, Malaysia—Longtime opposition leader Anwar Ibrahim was sworn in as Malaysia’s prime minister, capping his decadeslong quest for the top job and ending a scramble by opposing political coalitions to shore up support after elections last week failed to produce a clear winner.
Mr. Anwar’s rise to the premiership comes after a tumultuous career in which he was imprisoned twice, then came close to the role a few years ago after teaming up with his mentor-turned-nemesis.
His government will now have to contend with a divided electorate, a fragile economic recovery and the rise of an ultraconservative Islamist movement that allied with his rivals during the election.