When it was over, two people were dead and 19 others were wounded, police said. Five of the attackers were also killed.
A manhunt was underway for additional suspects.
Conflicting information emerged in the aftermath of the attacks, with some officials putting the number of dead at six.
So far there have been no claims of responsibility.
“Two of them (attackers) were suicide attackers, and three others were shot dead by the police just before their planned attacks,” M. Iqbal, police spokesman, said.
The other two who died in the attack included a Dutch citizen and an Indonesian national, Iqbal said.
The 20 injured have been rushed into several hospitals in the city, he said.
Iqbal’s statement revised previous statement from Brigadier General Anton Charliyan, national police spokesman, who said that one policeman was killed and two others got injured.
The explosions in front of the coffee shop injured several people, and the blast at the police post severely injured some policemen and killed the attackers, according to a policeman at the scene.
The police and the attackers exchanged fire after the explosions, Charliyan said, adding there were approximately 10 to 14 attackers in total.
He revealed that the attacks occurred after the police got a warning that the Islamic State terrorist group would launch attacks in Indonesia.
“It is clear that from the warning given by IS group that Indonesia will have a concert, Indonesia will be an international news,” he said.
Therefore, “we have given warnings too”, of the possible strikes, and conducted arrests of several militants in many places in the country, said Charliyan.
The spokesman said that some of the attackers were riding motorcycles and launched grenade attacks.
“Some perpetrators used grenades,” he said.
About 300 policemen and soldiers arrived at the scene after the attacks and surrounded the shopping centre where some of the attackers were holed up, said Charliyan.
The Indonesian president decided to cut short his working visit in a town of Cirebon in West Java and ordered the authorities to pursue and arrest the attackers in Jakarta.
“We all extend a heartfelt condolence to the victims of this attack. But we all certainly condemn the act which disturbed the security of the people and launched terror to the people,” President Widodo said.
Indonesia has experienced a series of major deadly attacks in the past. But in recent years, militants have resorted to smaller-scale attacks, mainly targeting foreigners and police. (IANS)