Indonesian armed police clear the area near a Starbucks after a series of blasts hit Jakarta on January 14, 2016 (Photo: AFP)
Islamic State (ISIS) carried out the attacks in Jakarta earlier on Thursday, a news agency allied to the group reported.
"ISIS militants carried out an armed attack this morning targeting foreign nationals and the security forces charged with protecting them in the Indonesian capital," Aamaaq news agency said on its Telegram channel.
Militants launched a gun and bomb assault in the centre of the Indonesian capital on Thursday, killing at least six people, police said, in an attack on a country that ISIS had threatened to put in its "spotlight".An Indonesian organisation with links to ISIS group is suspected of carrying out deadly shootings and suicide bombings in Jakarta Thursday, and was thought to be copying November attacks in Paris, police said.
IS claimed a series of coordinated shootings and suicide bombings in Paris in November that left 130 people dead.
Charliyan said that the group had earlier issued a cryptic warning, saying there would be a "concert in Indonesia", which had prompted police to beef up security ahead of New Year celebrations.
Police foiled a series of terror plots in December, including some believed linked to ISIS.
At least seven people -- five attackers and two civilians -- were killed in Jakarta Thursday as militants launched suicide, shooting and bombing attacks that tore through a Starbucks cafe and shook an embassy district in the Muslim-majority nation.
Police declared the attack over after several hours, and said no more assailants were on the loose.
Charliyan said three suicide bombers and two other assailants armed with pistols carried out the attacks, which he said began with a suspected suicide bombing at a Starbucks opposite a major shopping mall.
As explosion occurred, two armed assailants were waiting outside.
Two men then took hostages at the Starbucks, an Algerian and a Dutch citizen, and shot the Dutch national dead.
An Indonesian tried to help but was shot dead, he said. The Algerian was wounded.
After hearing a blast, police officers headed to the area and killed the attackers.
"Soon afterwards, two men riding a motorbike dropped their motorbikes, ran into a police post and blew themselves up," he said.
Four police officers were inside and are now in critical condition, Charliyan said.
As well as the suicide bombers, four explosive devices were detonated during the attacks -- one in Starbucks, after the suicide bombing, and during a shootout between police and the assailants.
"There are two more bombs that we suspected they wanted to blow up, two big ones," he said.
Hundreds of Indonesians are feared to have travelled abroad to join the self-proclaimed caliphate of the ISIS, and scores have since returned, raising concerns they could launch attacks on home soil.