KUALA LUMPUR (Reuters) - Former Malaysian premier Mahathir Mohamad on Monday met Anwar Ibrahim, the jailed de facto leader of the opposition alliance, for the first time in 18 years, signaling growing unity among opponents of scandal-tainted Prime Minister Najib Razak.
Malaysia's political landscape has been shaped for nearly two decades by a bitter feud between Anwar and Mahathir, whose decision to sack Anwar as his deputy sparked an opposition movement, Reformasi, or Reform, in 1998.
But in July, Anwar endorsed a political compact spearheaded by Mahathir, as ruling party rebels and the opposition joined hands to fight against Najib.
The new coalition poses potentially the biggest political threat to Najib, who has been facing calls to step down over multi-billion dollar graft allegations tied to a state-owned investment fund he oversaw, 1Malaysia Development Berhad (1MDB).
On Monday, social media was flooded with pictures of the two men shaking hands and chatting cordially in a high court in the capital, Kuala Lumpur, where Anwar had sought an injunction to stop implementation of the National Security Council (NSC) Act.
"He showed his preparedness to come and pledged his support for the court application, and wished me well and success. And I presume, therefore, that he supports the reform agenda," Anwar said outside the courtroom in a video on social media.
In a separate video, Mahathir said he endorsed his former deputy's court action against the legislation, but added that he was "not making peace with him". He gave no further details.
The legislation took effect from August 1, giving Najib sweeping powers to designate any area as a "security area" and deploy forces to search any individual, vehicle or premises without a warrant.
It also allows investigators to dispense with formal inquests into killings by the police or armed forces in those areas.
Monday's encounter was the two leaders' "first meeting after 18 years, 2 days," Anwar's wife, Wan Azizah Wan Ismail, who is the president of the People's Justice Party (PKR), said in a brief message on social network Twitter.
Anwar was sentenced to five years' jail in 2013 for sodomy, on a charge he and his supporters call politically motivated.
It is Anwar's second time in prison. He was first jailed by Mahathir on charges of sodomy and graft in the late 1990s, after his sacking as deputy prime minister.
(Reporting by Joseph Sipalan; Editing by Praveen Menon and Clarence Fernandez)