KUALA LUMPUR (Reuters) - Malaysia’s ruling party united behind scandal-tainted Prime Minister Najib Razak as he prepares for a general election due by August by deciding on Friday that he could stand unopposed in a party leadership contest due some time next year.

Malaysia's Prime Minister Najib Razak inspects an honour guard during the United Malays National Organization (UMNO) general assembly in Kuala Lumpur, Malaysia December 7, 2017. REUTERS/Lai Seng Sin

Najib is hoping to win a third term despite the multi-billion dollar corruption scandal at 1Malaysia Development Berhad (1MDB) that has dogged his premiership for the last two years.

Najib has consistently denied any wrongdoing at the state fund, which he founded and served as chairman of the advisory board.

At its last annual party conference before a general election, the United Malays National Organisation (UMNO) gave both Najib and his deputy, Ahmad Zahid Hamidi, a free pass to retain their posts in a party leadership ballot next year.

“Therefore, in the spirit of togetherness and mutuality...”

state-run news agency Bernama quoted permanent chairman Badruddin Amiruldin as saying, “it is decided at this assembly that the post of president held by Datuk Seri Najib Razak and the post of deputy president Datuk Seri Dr Ahmad Zahid Hamidi, will not be contested in the coming elections.”

When the 1MDB controversy first erupted in 2015, Najib quashed an internal revolt after some UMNO leaders asked him to step down and he blocked an inquiry into the affair.

Leadership elections were postponed as he went on to purge the party of dissent while he also dropped his former liberal image, cracking down on opponents and civil society, as he moved UMNO closer to conservative Islamist values, worrying Malaysia’s sizable Chinese and Indian minorities.

Addressing the conference earlier this week, Najib called for loyalty from UMNO’s 3.4 million members.

“Have absolute loyalty and obey all the instructions of the top leadership,” he said in a keynote address to the party faithful.

Four years ago, UMNO crept back into power despite registering its worst ever election performance, as an opposition front led the charismatic Anwar Ibrahim called foul after losing despite winning the popular vote.

This time, however, the challenge is coming from the veteran Mahathir Mohamad - who gave up the premiership in 2003 after 22 years in power and had been Najib’s political mentor.

Mahathir, has come out of retirement to team up with Anwar - who is languishing in jail having been convicted in a case that both he and independent observers say was politically motivated.

A rebounding economy and strengthening ringgit currency have helped Najib improve his image among Malaysians, who have been frustrated with the corruption and rising living costs.

But the 1MDB scandal refuses to go away, with U.S. Attorney General this week referring to the case as the worst example of kleptocracy that the Department of Justice had investigated.