Former prime minister Tun Dr Mahathir Mohamad prays that presidential candidate from the Indonesian Democratic Party of Struggle (PDI-P), Joko Widodo (Jokowi) is elected as the new Indonesian president at the presidential election on July 9.

"I pray for Bapak Jokowi to be elected as the next president," said Dr Mahathir to Jokowi before leaving the residence of PDI-P chairman, Megawati Soekarnoputri here, Monday.

Asked to comment on Dr Mahathir's statement, Jokowi, who is also the Governor of Jakarta, and the most popular candidate among the presidential candidates, only smiled while uttering: "Amin."

Prior to this, Indonesian President Susilo Bambang Yudhoyono, who would be ending his tenure in October, openly endorsed Jokowi as his successor.

At the parliamentary election on April 9, PDI-P emerged at the top position via a quick count carried out by numerous research bodies.

On his meeting with Megawati, Dr Mahathir said his call on the fifth Indonesian president was a meeting of two old friends especially because they both often met in dialogues and events involving Asean.

"I am very happy to see Ibu Megawati healthy and I hope the friendship is also reflected by both nations, Indonesia and Malaysia," said Dr Mahathir.

Also present at the meeting with Megawati was Malaysian Ambassador to Indonesia, Datuk Seri Zahrain Mohamed Hashim, Jokowi and Megawati's daughter, Puan Maharani, who is also a senior leader of PDI-P.

Earlier, talking to reporters before delivering his general lecture titled 'Malaysia-Indonesia: Yesterday, Today and Forever', Dr Mahathir said he would befriend anybody who is elected as the new president of Indonesia.

As such, he hopes the new Indonesian president could further improve Malaysia-Indonesia ties despite the hiccups between the two neighbours, prior to this.

Dr Mahathir said he supported anybody who is elected as the new president of Indonesia for the good of both nations.

"Indonesia's ties with Malaysia all these while have been going on well. I hope the new Indonesian president can continue the cooperation which had been established and solve any existing issues.

"I am friend to all including the press (journalists). Whoever is the new Indonesian president will be a friend, if he accepts my friendship," he said.

Without explaining on the existing issues which cropped up between the two nations, he said the good Indonesia-Malaysia ties were not only important for both nations, but also for the stability of the South East Asian region.

"The good ties between the two neighbours are not only profitable to Indonesia and Malaysia but also very important for South East Asia."

In the meantime, Dr Mahathir was impressed with the general election process in Indonesia which took place peacefully because it is not easy to carry out the process with a population of more than 250 million people.

Dr Mahathir was accompanied by his wife, Tun Dr Siti Hasmah Mohd Ali, on his two-day working visit to Jakarta.