Seven people, including four suspected attackers, died in bomb blasts and gunfire in the centre of the Indonesian capital Jakarta on Thursday, police said, in what the country's president described as an act of terrorism.
The assailants struck outside a Starbucks cafe and a police post near the well-known Sarinah shopping complex, city police spokesman Muhammad Iqbal said.
"Four suspected perpetrators were killed in a gunfight with the police," Iqbal said on broadcaster TVOne.
He said police believed no attackers were on the loose. Three police were injured.
Starbucks said one of its customers was injured in the attacks, but that its employees were unhurt.
Indonesian President Joko Widodo called for calm.
"We must not be afraid and be defeated by this terror act," Joko was quoted as saying by Kompas.com news website.
Soon after the attack started, police cordoned off the area, which contains many offices, and using loudspeakers told people to remain in their buildings. Later hundreds of police and soldiers arrived in armoured vehicles.
The busy district is home to United Nations offices and the French embassy, but there appeared to be no serious damage from the blasts to larger buildings in the area.
"I was in a meeting when I heard an explosion and then there was gunfire," said Ruly Koestaman, an office worker in a nearby building.
"We went down and saw three people lying dead, and also two foreigners badly injured but still alive," he said.
A mobile phone video taken from a high-rise building showed one of the explosions followed by smoke.
An earlier rumour that blasts went off in three other Jakarta locations proved untrue, TVOne said.
Indonesia has faced problems in recent years with extremist violence, often linked to Islamist groups, and it is estimated that hundreds of Indonesians have joined the Islamic State group in the Middle East.
Police last month arrested nine suspected militants they said were planning coordinated attacks on New Year's Eve.