The so-called "Islamic State" (IS) terrorist organization said it was responsible for the attack in a busy commercial district of Jakarta on Thursday, according to a news agency affiliated with the group.

The Aamaq news agency quoted an unnamed source claiming responsibility for the attack, which left seven people - including the five attackers - dead after an explosion tore through a Starbucks frequented by upper-middle-class Indonesians, ex-pats and UN diplomats.

Earlier on Thursday, Indonesian authorities said IS had hinted at a possible strike in the vein of the November 13 terrorist attacks in Paris, which officials said the attackers were clearly trying to emulate.

Witnesses to the attack on Thursday described a chaotic scene, as police engaged in a gun battle with the militants following a suicide bomber's detonation in the Starbucks. The militants also attacked a police post.

Indonesia's chief security minister Luhut Pandjaitan

Home-grown extremism?

Indonesia is the world's most populous Muslim country, and has been the victim of terrorism attacks in the past. The country was the site of several bombings between 2000 and 2009, as well as a major attack on the resort island of Bali that left 202 dead. Some 500 to 700 Indonesians have reportedly gone to the Middle East to join IS, and one monitoring group has suggested that many of them have since returned.

Frank Heiduk, an Asia expert at the German Institute for International Security Affairs, said the Indonesan government has failed to tackle the growing Islamic extremism in the country.

"There is a hard core of Islamist militancy in the country, and the authorities have to deal with this. And although most Indonesians disapprove of al Qaeda and IS's goals and actions, there are ever-stronger societal movements that endorse an increasingly conservative and intolerant view of Islam," Heiduk told DW.

blc/rc (AP, dpa, Reuters, AFP)