Police officers stand guard near where blasts and gunshots rang out on Thursday afternoon. The terror attacks in the heart of Jakarta killed seven people, including five attackers (Pic courtesy Jakarta Post)

Police in Indonesia have identified four out of five of the Jakarta attackers, naming one of two who were previously convicted militants.

Afif Sunakim, seen carrying a gun and rucksack, served seven years in prison for attending a militant camp in Aceh, police chief Gen Badrodin Haiti said.

All five were killed in Thursday’s gun and bomb attacks in the Indonesian capital, which left two civilians dead.

The Islamic State (IS) militant group has said it was behind the violence.

Security forces battled militants for hours in the busy commercial district where the militants struck.

A Canadian and an Indonesian national died, and at least 20 people were injured.

The assault ended when two attackers died in a suicide bombing, police say, with the other three killed in gun battles.

Following recent IS threats, the country, which had been attacked by Islamist militants several times in the past, had been on high alert.

Gen Haiti, the national police chief, said Sunakim and one other attacker had both been convicted criminals.

Jakarta’s chief of police, Insp Gen Tito Karnavian, said a hunt was under way for terror cells believed to be behind the attack.

Three men were arrested near Jakarta early on Friday, police told local media. It was not immediately clear whether they had direct links the attacks.

Authorities have named Bahrum Naim, an Indonesian believed to be fighting with IS in Syria, as the suspected co-ordinator.

Insp Gen Karnavian said Naim’s “vision” was to unite various IS-supporting groups across South East Asia.

IS released a statement saying it had targeted citizens of countries which are part of the international coalition fighting the group, which controls parts of Syria and Iraq. (BBC)