Isis has claimed responsibility for the Jakarta attacks, saying it targeted foreigners from the “crusader alliance” fighting their militants in Iraq and Syria.

“Islamic State fighters 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.

Five attackers and two bystanders, a Canadian and an Indonesian, died in suicide bombings and shootings in the Indonesian capital on Thursday morning.

Emergency workers at the scene of the attack in Jakarta on 14 January 2016 (EPA)

A later statement released directly from Isis’ propaganda arm wrongly claimed 15 “infidels” were killed.

“A group of soldiers of the caliphate in Indonesia targeted a gathering from the crusader alliance that fights the Islamic State in Jakarta,” the group said, saying four militants wearing suicide belts and armed with guns had planted several bombs with timers.

But Indonesia is not carrying out air strikes on Isis territories either the US-led coalition or Saudi-led Islamic Military Alliance, which it is reported to be supporting with military aid.

Major General Tito Karnavian, Jakarta’s police chief, told a news conference that the first suicide bombing happened by a Starbucks restaurant, causing customers to flee.

Outside, two gunmen opened fire, killing the Canadian victim and wounding another.

At the same time, two other suicide bombers attacked a nearby traffic police booth, killing themselves and an Indonesian man.

(AP)

Minutes later, a group of officers were attacked by the remaining two gunmen using homemade bombs before a 15-minute gunfight where they were both killed.

Six more IEDs, five said to be small and one “big”, were then found in surrounding buildings before they were detonated.

Police believe the attackers, armed with bombs, grenades, guns and knives, planned to follow up initial attacks with a larger explosion where people were expected to gather in the ensuing panic, but were stopped.

The attack happened by the Sarinah shopping centre, on Thamrin Street, which also houses a McDonalds and other multinational brands.

A Pizza Hut and Burger King are next to the Djakarta Theater XXI cinema, while the five-star Sari Pan Pacific Jakarta hotel is the next building along and United Nations and government offices are nearby.

In pictures: Jakarta attacks Show all 10 1 /10 In pictures: Jakarta attacks In pictures: Jakarta attacks People carry an injured police officer near the site where an explosion went off in Jakarta In pictures: Jakarta attacks Indonesian special forces officers identify victims at the scene of a bomb blast in Jakarta EPA In pictures: Jakarta attacks Police gather outside a restaurant near the scene of an attack in central Jakarta, after militants launched a gun and bomb assault in the center of the Indonesian capital Reuters In pictures: Jakarta attacks The scene of a bomb blast at a police station in front of a shopping mall in Jakarta EPA In pictures: Jakarta attacks Indonesian soldiers in armoured vehicles at the scene of a bomb blast in Jakarta EPA In pictures: Jakarta attacks An Indonesian special forces officer identifies victims at the scene of a bomb blast in Jakarta EPA In pictures: Jakarta attacks A police armored vehicle is parked outside a Starbucks Cafe near where an explosion went off in Jakarta AP In pictures: Jakarta attacks Police officers take cover behind a car during a gun battle with attackers near the site where an explosion went off in Jakarta AP In pictures: Jakarta attacks A member of the police bomb squad unit approaches the scene of an explosion following an attack on a police box in central Jakarta Reuters In pictures: Jakarta attacks Indonesian forensic policemen work inside a cafe after a bomb blast in front of a shopping mall in Jakarta EPA

Isis’ claim of responsibility was impossible to verify but police previously said they believed militants had been “imitating” the November attacks in Paris.

“They imitated the terror actions in Paris,” General Anton Charliyan said. “We have identified all attackers...we can say that the attackers were affiliated with the Isis group,”

He told reporters that officers had received information in late November containing a threat from Isis to carry out large-scale attacks in the country.

It sparked huge police operations around New Year’s Eve and deputy police chief Budi Gunawan said tight security during celebrations may have forced terrorists to move the attack to today.

Indonesian president Joko Widodo (C, white shirt) visits the site of a bomb blast at Thamrin business district in Jakarta, January 14, 2016 (Reuters)

Isis had previously threatened to put the country in its “spotlight” following the Paris attacks in November that killed 130 people.

George Brandis, Australia’s Attorney-General, said last month that the so-called Islamic State had “ambitions to elevate its presence and level of activity in Indonesia”, either directly or through affiliates.

“Isis has a declared intention to establish caliphates beyond the Middle East, provincial caliphates in effect,” he added. “It has identified Indonesia as a location of its ambitions.”

Previous terror attacks in Indonesia have been carried out by the Jemaah Islamiyah group, which was linked to al-Qaeda.

Its militants were behind explosions at two Jakarta hotels that killed seven people in 2009 and the 2002 bombings at a Bali nightclub that killed 202 people, mainly foreign tourists.

Like Isis, Jemaah Islamiyah, also aims to establish an Islamic “caliphate” in south-east Asian countries including Indonesia, Thailand, Singapore, Malaysia and the Philippines.