Militants launched a gun and bomb assault in the center of the Indonesian capital on Thursday, police said, in an attack that followed a threat by Islamic State fighters to put the country in their "spotlight."
Five suspected attackers were among seven dead, after the bombs went off in a major shopping and business district. One blast was in a Starbucks cafe.
An Islamic State-allied news agency said several hours after the attacks that the militant group carried them out, "targeting foreign nationals and security forces."
A Canadian man was among those killed, Metro TV said, quoting a police official.
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.
The attack began around 10.30am with a blast just outside a Starbucks café near the intersection. A police post in the intersection by the cafe was also damaged in one of the explosions.
Police said they suspected at least three suicide bombers were involved. The numbers kept changing in the hours after the attack, but by late afternoon officials said five militants had died and two had been arrested. One policeman was also killed.
Indonesia has been on edge in recent weeks over the threat posed by Islamist militants and counter-terrorism police have launched a crackdown on people with suspected links to the Islamic State.
"We have previously received a threat from Islamic State that Indonesia will be the spotlight," police spokesman Anton Charliyan told reporters.
Indonesian President Joko Widodo, widely known as Jokowi, later declared: "We don't have to be afraid. We will not be defeated by acts of terror like this."
Police snipers were deployed, according to media.
A United Nations building near the scene was in lock-down with no one allowed in or out, a witness said. Some other buildings in the area were evacuated.
The Australian Broadcasting Corporation quoted from an internal UN alert that said: "Dear colleagues, more explosions and shootings in the area. Apparently they are using rifles and hand grenades. We are in a perimeter in our UN building covered by armed personnel. We may have a UN staff injured during the initial bombing."
Unconfirmed reports a UN staffer killed in Starbucks
— Adam Harvey (@adharves)January 14, 2016
Indonesia's central bank is located in the same area, and a spokesman for the bank said a policy meeting would go ahead as planned later in the day.
Indonesia has the world's largest Muslim population, the vast majority of whom practice a moderate form of the religion.
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 the Islamic State and Indonesians who return after fighting with the group.
The last major militant attacks in Jakarta were in July 2009, with bombs at the JW Marriott and Ritz Carlton hotels.