Islamic State has claimed responsibility for a gun and bomb assault in the centre of Jakarta that killed seven people, five of whom were attackers.

"A group of soldiers of the caliphate in Indonesia targeted a gathering from the crusader alliance that fights the Islamic State in Jakarta through planting several explosive devices that went off as four of the soldiers attacked with light weapons and explosive belts," the group said in a statement.

Islamic State's statement said there were 15 people killed but the official tally according to the Indonesian government was seven. A news agency affiliated to Islamic State had earlier reported the group's responsibility.

Indonesian President Joko Widodo condemns the attack in Jakarta that killed at least six people.

The seven were killed in multiple blasts and a gunfight, and five of them were the attackers themselves. The brazenness of their siege suggested a new brand of militancy in a country where low-level strikes on police are common.

READ MORE: Kiwis in Jakarta tell of shock

Twitter/Robert Harianto Video of the explosion at Starbucks in a downtown Jakarta location.

It took security forces about three hours to end the attack near a Starbucks cafe and Sarinah's, Jakarta's oldest department store, after a team of seven militants traded gunfire with police and blew themselves up.

An Indonesian and a Canadian were killed in the attack. Twenty people, including an Algerian, Austrian, German and a man from the Netherlands, were wounded.

Hours after police declared the attack over, there were fresh explosions in or around the same location, Kompas TV reported. Police officials said they could not yet comment on the cause of the blasts.

REUTERS Police gather outside a Pizza Hut outlet near the scene of the attack in central Jakarta.

"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, which is allied to the group, said.

Jakarta's police chief Tito Karnavian told reporters: "Isis is behind this attack definitely," using a common acronym for Islamic State, and he named an Indonesian militant called Bahrun Naim as the man responsible for plotting it.

Police believe Naim is in the Syrian city of Raqqa.

The drama played out on the streets and on television screens, with at least six explosions and a gunfight in a movie theatre. But the low death toll pointed to the involvement of local militants whose weapons were rudimentary, experts said.

National police spokesman Anton Charliyan said on Thursday night that the terrorists were "from the ISIS group".

"They claimed Indonesia will be in the world headlines," he said. "They said 'they will have a concert.' "

GETTY IMAGES Police search for suspects after a series blasts hit the Indonesian capital.

ARMOURED CARS, HELICOPTERS

"The Starbucks cafe windows are blown out. I see three dead people on the road. There has been a lull in the shooting but someone is on the roof of the building and police are aiming their guns at him," Reuters photographer Darren Whiteside said as the attack unfolded.

Police responded in force within minutes. Black armoured cars screeched to a halt in front of the Starbucks and sniper teams were deployed around the neighbourhood as helicopters buzzed overhead.

REUTERS Indonesian police hold rifles as they respond to the attack.

Karnavian said one man entered the Starbucks cafe and blew himself up, wounding several inside.

As people poured out of the cafe, two waiting gunmen opened fire on them. At the same time, two militants attacked a police traffic post nearby, using what he described as hand grenade-like bombs.

After the militants had been overcome, a body still lay on the street, a shoe nearby among the debris. The city centre's notoriously jammed roads were largely deserted.

REUTERS Panicked Indonesian workers run as they are evacuated from their office at Thamrin business district in Jakarta.

Indonesia has seen attacks by Islamist militants before, but a coordinated assault by a team of suicide bombers and gunmen is unprecedented and has echoes of the sieges seen in Mumbai seven years ago and in Paris last November.

Australian Attorney-General George Brandis, who was in Jakarta recently to bolster security coordination, told the Australian newspaper he had "no doubt" Islamic State was seeking to establish a "distant caliphate" in Indonesia.

The last major militant attacks in Jakarta were in July 2009, with bombs at the JW Marriott and Ritz Carlton hotels.

REUTERS Jakarta police officers react near the site of the blasts.

The country had been on edge for weeks over the threat posed by Islamist militants.

Counter-terrorism police had rounded up about 20 people with suspected links to Islamic State, whose battle lines in Syria and Iraq have included nationals from several Asian countries.

HISTORY OF ATTACKS

REUTERS An Indonesian policeman near the site of the blasts.

Indonesia has the world's largest Muslim population, the vast majority of whom practise a moderate form of Islam.

The country saw a spate of militant attacks in the 2000s, the deadliest of which was a nightclub bombing on the holiday island of Bali that killed 202 people, most of them tourists.

Police have been largely successful in destroying domestic militant cells since then, but officials have more recently been worrying about a resurgence inspired by groups such as Islamic State and Indonesians who return after fighting with the group.

REUTERS Police officers react near the site of a blast in Jakarta, Indonesia in January.

Alarm around the world over the danger stemming from Islamic State increased after the Paris attacks and the killing of 14 people in California in December.

On Tuesday, a Syrian suicide bomber killed 10 German tourists in Istanbul. Authorities there suspect the bomber had links to Islamic State.

Harits Abu Ulya, a expert on militancy who knows Bahrun Naim, the militant named by Indonesian authorities, said he expected more attacks.

"This is an indication that he has been learning from the Paris attacks and he has studied the strategy," he said. "I still have doubts about the capability of the local militants to carry out attacks on a bigger scale. But it is a possibility."

US CONDEMNS ATTACK

"These acts of terror are not going to intimidate nation-states from protecting their citizens and continuing to provide real opportunity, education, jobs, possibilities of a future," US Secretary of State John Kerry said, during a break in talks in London with Saudi Foreign Minister Adel al-Jubeir.

Edward Rees/Twitter A blast went off in front of a shopping mall in central Jakarta.

"There is nothing in any act of terror that offers anything but death and destruction.

"And so we stand together, all of us, united in our efforts to eliminate those who choose terror."

Al-Jubeir also condemned the attacks.

He said: "If anything, it should strengthen our resolve to work effectively together to combat the scourge of terrorism."

The US State Department said the topics discussed at the meeting in London included Iran and a political process to end the war in Syria.

- REUTERS with AAP