Anwar will likely face challenges from the Parti Islam Se-Malaysia, or Pas as it is known, which emerged as one of the big winners in Malaysia's election last Saturday, risking deeper divisions in the diverse, multi-faith country.
Anwar, who is ethnic Malay and Muslim, addressed race and religion in his first news conference as prime minister, promising to uphold Islam as the official religion of the country and the rights of the ethnic Malay majority, while also safeguarding the rights of all.
Pas, long a powerhouse in northeastern parts of Malaysia, has become a national force by winning the most seats of any party: 49 of the total of 222, nearly triple its tally in the last election in 2018.
Pas has banned cinemas and advocated caning as a punishment for homosexuality in states that it runs and put its religious appeals front and centre in the election, with one leader saying voters would "go to hell" if they voted for Anwar's coalition.
Race and religion are thorny issues in Malaysia, where Muslim ethnic Malays form a majority in a country with significant ethnic Chinese and ethnic Indian minorities, most of them Hindu, Buddhist or Christian.
As the biggest party in parliament, Pas could push for Islamisation and more affirmative action for Malays - a long-standing policy that Anwar has opposed, analysts said. Pas could also play up its religious credentials to distinguish itself from other Malay-centric parties, they say.
"The big victory of Pas in this election proves that Malay and Islamic politics is still the dominant core of Malaysian politics," said Mohd Izani Mohd Zain, an associate professor at University Putra Malaysia.
'RELIGIOUS RHETORIC'
The election illustrated how polarised Malaysia has become.
While on the one hand Pas did well on its own, Anwar's bloc of progressive parties, which includes the predominantly ethnic Chinese Democratic Action Party (DAP), won the most seats of any alliance.
A conservative, predominately Malay Muslim coalition led by Muhyiddin Yassin, which includes Pas, came second.
The result was a hung parliament with no bloc winning a majority. In the ensuing five-day crisis, ethnic tensions came to the fore on social media.
In the midst of the standoff, Pas called on all parties to respect the constitution, preserve public order and avoid provocation that could threaten national harmony.
The party did not respond to a request for comment but it congratulated Anwar on Friday, saying it was confident he would "prioritise the concept of federalism for all states and the people".
Oh Ei Sun, a senior fellow with Singapore's Institute of International Affairs, characterized the Malay parties as being in a "race to the bottom" to prove their religious credentials to a significant portion of voters who are receptive to religious appeals.
"Certainly, Pas could play up its religious rhetoric," Oh said.
The new popularity of Pas is also partly a result of the decline of the long-dominant United Malays National Organisation (UMNO), for generations the party of choice for Malays that has recently been mired in graft scandals.
UMNO's former leader, ex-premier Najib Razak, is in jail for corruption and abuse of power over the looting of funds from the 1MDB state fund.
'CLEAN PARTY'
Under current president Abdul Hadi Awang, Pas has been pushing for the expansion of sharia that allows for harsher punishments for Muslims nationwide. Malaysia has a dual-track legal system, with Islamic criminal and family laws applicable to Muslims running alongside civil laws.
Paspressed for the law aggressively as the opposition, though analysts say it moderated its views while it was part of a governing coalition after 2020.
In regional governments that it runs, Pas has enforced stricter rules. In Kelantan state, cinemas have been banned since 1990 for causing "social ills", and in 2017, a man was fined for wearing a pair of shorts that exposed his knees.
In 2018, two women were publicly caned after being accused of attempting lesbian sex in Terengganu state.
Pas has called for tighter controls on alcohol and gambling.
Analysts say the 70-year-old party, founded before Malaysia's independence from Britain, has worked for decades to build its reach, at times cooperating with Anwar and the DAP to win power.
Pas has also built a strong base through private and informal religious schools, which it partly funds.
It offers training for civil society and party members, aiming to produce scholars and professionals with Islamic knowledge, said Mohd Izani, adding that such efforts have helped Pas win support among young Malays who want to see reforms.
"They see Pas as a clean party and its political leaders have no integrity problems," said Mohd Izani.