Militants who attacked a busy shopping area in downtown Jakarta were copying the Paris attacks, authorities have said.
Indonesia's national police spokesman also said they probably had connections to so-called Islamic State.
General Anton Charliyan said: "They imitated the terror actions in Paris...they are likely from the (Islamic State) group."
Indonesian police have arrested four suspected militants following the gun and bomb attacks in the centre of the capital Jakarta.
Five assailants were confirmed dead, along with two other people.
Police declared the area secure shortly before 8am GMT after sweeping through the area.
Jakarta police spokesman Col. Muhammad Iqbal said: "We believe there are no more attackers around Sarinah. We have taken control."
Militants have launched a series of co-ordinated bomb and gun attacks in the Indonesian capital Jakarta. Here's what we know so far.Read the full story ›
Surveillance footage has emerged showing an explosion outside a Starbucks in central Jakarta.
The area around the explosion appeared quiet, with no pedestrians in sight.
This video being shared on social media appears to show people fleeing amid heavy gunfire in the Indonesian capital Jakarta.
Sorry, this content isn't available on your device.
Starbucks has said it is "deeply saddened by the senseless acts" in Jakarta.
The company said one customer was injured and treated at the scene, with all employees confirmed safe.
"Our hearts are with the people of Indonesia," the company said in a statement.
"Amidst reports of attacks targeting police posts throughout central Jakarta, initial reports are that an explosion took place close to our store in the Skyline building near one of these police posts.
"This store and all other Starbucks stores in Jakarta will remain closed, out of an abundance of caution, until further notice."
Twitter members in Indonesia have begun using the hashtag #KamiTidakTakut, meaning "We Are Not Afraid", following the deadly attacks in the capital.
Several people have been killed in a series of co-ordinated bomb and gun attacks in Jakarta.
Four suspected militants have been killed and the area is being secured after a siege in the Indonesian capital Jakarta, a police spokesman said.
A police spokesman said officers were "sterilising the building" after a gunbattle between the attacks and police took place in a cinema.
"We will declare the situation secure soon," he said.
There is no indication at present that so-called Islamic State is responsible for the attack on the Indonesian capital Jakarta, the head of the national intelligence agency has said.
"This is definitely terrorism but there are no indications yet that it's ISIS related," said Sutiyoso.
Indonesian president Joko Widodo has said the situation in the country's capital is under control following a series of bomb and gun attacks.
"The state, nation and people should not be afraid of, and lose to, such terror acts," he said.
He condemned the attacks, adding: "We express condolence to those who became victims, but we all also condemn the attack that caused restless among the community."
Mr Jokowi has cut short a planned engagement to return to Jakarta.