Days after taking in the stunning election triumph of Malaysia’s long-languishing Pakatan Harapan political pact, the country’s 31 million people on Tuesday were steadying themselves for yet another historic moment – the release from jail of the victorious alliance’s icon, Anwar Ibrahim.

Ahead of the 70-year-old leader’s release, Prime Minister Mahathir Mohamad, who has had a topsy-turvy relationship with his protégé-turned-rival-turned-ally, said the development will not bring immediate changes to the power structure of his five-day-old government.

In comments to a business conference on Tuesday, Mahathir confirmed the jailed leader will be released on Wednesday but said: “I don’t know what time”.

Anwar was sentenced to a five-year jail term, his third stint in prison, for charges of sodomy he says were trumped up by the ousted premier Najib Razak.

The country’s constitutional king Muhammad V last week agreed to grant Anwar a full pardon after a request from Pakatan Harapan leaders.

The Prison Pardons Board met on Wednesday and Anwar was released soon after.

134 billion reasons for Mahathir not to rethink Chinese investment

One of the pact’s key pledges is to make Anwar prime minister within two years.

The ruling alliance wasted no time in preparing a hero’s welcome for their icon.

On Tuesday, 92-year-old Mahathir wrote off the prospect of immediately handing over power to Anwar, as hoped by some among Anwar’s large urban support base.

“[In] an initial stage, maybe lasting one or two years, I will be prime minister,” Mahathir told a Wall Street Journal conference in Tokyo via video link.

Frozen in fear, then I cried: election through Malaysian eyes

He added: “I will play a role in the background even when I step down.”

Meanwhile, Anwar’s wife Wan Azizah Wan Ismail sought to dispel suggestions her husband wanted immediate power in the first place.

The four parties that make up Pakatan Harapan, including Anwar’s Parti Keadilan Rakyat (People’s Justice Party), had agreed before the election that Mahathir will be premier and Wan Azizah will be deputy premier.

“This matter is up for discussion, but Anwar has never demanded to be prime minister immediately,” she was quoted as telling reporters at a rehabilitation hospital where her husband was recuperating from a shoulder surgery.

Anwar’s release on Wednesday capped a tumultuous two decades he has endured.

He was serving as Mahathir’s deputy during the veteran politician’s first stint as prime minister when he was suddenly sacked in 1998, and later jailed for sodomy and corruption.

Mahathir, at that time said he had to remove Anwar because he was “not fit for office”.

Upon his release in 2004, Anwar galvanised the “Reformasi” movement against Barisan Nasional that he started before going to jail.

Malaysia boleh: Mahathir’s return to power brings new era of hope

The movement provided a much-needed ballast to the languishing opposition, which Anwar careened into a potent force. Pakatan Harapan’s predecessor, Pakatan Rakyat, dealt heavy blows to Barisan Nasional in the 2008 and 2013 elections.

Anwar, however, was again jailed for sodomy in 2015, this time under Najib’s watch.

He maintains his innocence, and says on both occasions Mahathir and Najib turned to trumping up charges against him to keep him out of politics.

To this day, Mahathir maintains he sacked Anwar following advice from the police, and that it was the courts who decided Anwar’s fate – not him.

Still, Anwar from prison embraced Mahathir’s decision to quit Barisan Nasional and join Pakatan Harapan in 2016.

Mahathir crossed aisles because he felt it was untenable to support Najib as premier following widespread allegations of his involvement in the 1MDB scandal.

On the eve of last week’s election, Anwar penned a note to supporters urging them to back Mahathir, who had brought him into government in the 1980s.

Mahathir, the Malaysian dictator who became a giant killer

Anwar was a firebrand Islamist student activist before his entry into politics, and had served 20 months of jail time in the 1970s after being detained without trial for his activism.

Later in his political life, he preached moderate Islam and democratisation.

“Mahathir has proven his tenacity, accepted his past limitations, apologised and sacrificed his time and energy to raise the dignity of the people,” Anwar wrote in the note on May 8. “I urge you all to join the people’s movement to demand for change.”

Mahathir, in his remarks on Tuesday, signalled he was moving fast to effect that change.

After barring Najib and his wife Rosmah Mansor from leaving the country on Saturday, the leader said criminal charges may be imminent.

“We think that within a short while we will have a case against him. We will be able to charge him.”

Najib has repeatedly denied allegations that some US$700 million found in his bank accounts were funnelled from 1MDB. He says the funds were political donations from a Saudi royal family member. US investigators say some US3.5 billion was misappropriated from the fund.

Mahathir has removed the Najib-era attorney general, treasury chief, and anti-corruption agency chief as he ordered officials to step up investigations.