Mahathir - who had retired in 2003 as premier but made a comeback in a bid to oust the coalition he once headed - was sworn in Thursday, becoming the world's oldest elected leader at 92.
"So in Anwar's situation, his disqualification can only be lifted five years after he is released from prison, unless he receives a royal pardon or if the disqualification is removed by the King", he said.
A full pardon by the king would mean Anwar can return to active politics.
He didn't say how long the process will take and whether Anwar could be freed before his sentence ends on June 8.
"He followed the events of the new prime minister and how the victory of Pakatan Harapan has created history and that he is part of it", she said.
Former PM Mahathir Mohamad storms back to power in Malaysia
Mahathir was the country's prime minister for 22 years, between 1981 and 2003, making him the country's longest-serving leader. In his earlier statement on social media, Mr Najib said he was committed to "facilitating a smooth transfer of power".
His wife and proposed deputy prime minister, Dr Wan Azizah Wan Ismail, had told Channel NewsAsia in an interview earlier this year that she will probably be the one to give up her Pandan seat for Anwar - paving the way for a by-election.
Mahathir said his four-party alliance will hold a meeting Saturday and name 10 ministers for a start. Malaysian Cabinets have in the past had more than 30 ministers. Najib's premiership has been battered by a massive financial scandal, in which he was accused of overseeing the plunder of billions of dollars from sovereign wealth fund 1MDB.
"The attorney-general has undermined his own credibility". It was a major issue in the run-up to the election and played a major role in the ouster of Najib, Mahathir's former protegé.
USA investigators say Najib's associates stole and looted at least $4.5 billion from the fund, of which some $700 million landed in Najib's bank account.
Mahathir has said he would not go on a witch hunt but that Najib will be brought to court if there was evidence of wrongdoing.