A sword-wielding militant killed an Indonesian policeman and critically injured another on Monday in what authorities described as a suspected Islamic State-linked attack.

The attacker was shot dead during the early morning raid at a police post in South Daha district on Kalimantan -- Indonesia's section of Borneo island.

Indonesia's national police initially said there were two attackers, but local authorities later said only one militant was directly involved.

‘One police officer was killed and the attacker also died,’ South Hulu Sungai police chief Dedy Eka Jaya told AFP.

‘We're still investigating possible links’ to IS, he added.

The militant -- identified as a 19-year-old local named Abdurrahman -- initially set a car on fire outside the police post, Jaya said.

‘When it exploded, one of the officers came outside to check and that's when the initial attack started,’ he added.

Images from the scene showed an apparently deceased man lying on his back inside the police station.

Authorities said they confiscated his sword, a Koran, a handwritten letter calling for jihad and a flag bearing the ‘tauhid’ -- which expresses the belief in Allah as the one and only god.

Images of the black and white-lettered flag showed it resembled one commonly used by IS followers.

Monday's incident happened on a public holiday that celebrates the Southeast Asian archipelago's pluralist democracy, and many past attacks have been against police and other state symbols.

In April, a couple with links to Islamic State went on trial for a failed assassination attempt on Indonesia's former chief security minister last year.

In November, an IS-linked suicide bomber killed himself and wounded six others in a police station attack on Sumatra island.