It was Aidilfitri on a moderate scale yet still joyous for Muslims here who celebrated the occasion visiting relatives and going to open houses organised by Indonesia's leaders including President Joko Widodo.

Online media reported that thousands of people including Cabinet ministers and dignitaries came to the open house held by Jokowi for the first time at the Presidential Palace.

Earlier in the morning, the president and Vice President Jusuf Kalla performed Aidilfitri prayers with thousands of fellow muslims at Istiqlal Mosque here.

Meanwhile, Malaysian Ambassador to Indonesia Datuk Seri Zahrain Mohamed Hashim and his wife Datin Seri Che Mahani Ismail were at Indonesian Foreign Minister Retno Marsudi's open house at Jalan Widya Chandra here.

They were earlier received by Retno and her husband Agus Marsudi, after which both dignitaries and their spouses joined the respective receptions held at their embassies.

However, in Medan, the celebration was marred by a terrorist attack on the police security post at the District Police Headquarters.

In the 3am incident, a policeman died after being stabbed by two men believed to be terrorists.

Indonesian Police public communications chief Setyo Wasisto was quoted by online media as saying that Martua Sigalingging died at the scene.

He also said the two men who were unidentified proclaimed the 'takbir' and jumped into the premises before stabbing Martua.

A Medan Police special team upon realising what was happening, let out several shots at the two men. One of the attackers died at the scene while the other was seriously injured.

Initial investigations found that the duo were linked to Daesh.

-- BERNAMA