Global Affairs Canada is investigating reports that a Canadian is among the victims in the Indonesian capital of Jakarta, after attacks involving multiple suicide bombers and gunmen that police say were affiliates of the Islamic State group.

In a statement issued Thursday afternoon, Foreign Affairs Minister Stephane Dion said that the Canadian government is working with Indonesian authorities to confirm the identity of the victim killed in the attacks that began with an explosion at a Starbucks cafe in a busy shopping area.

"On behalf of all Canadians, I offer my heartfelt condolences to the families and friends of the victims and wish a speedy recovery to the wounded," he said in the statement. "Canada will continue to stand by Indonesia and co-operate in the fight against extremism."

The explosion at the Jakarta Starbucks led to a prolonged gun battle between gunmen and police Thursday, that lasted for approximately five hours. Police say, when it was over, all five attackers and two civilians – a Canadian and an Indonesian -- were dead. At least 20 others were injured.

Police Chief Maj.-Gen. Tito Karnavian said at a news conference that, after the suicide blast at the Starbucks, customers ran outside, where two gunmen opened fire.

At nearly the same time, two other suicide bombers attacked a nearby traffic police booth, killing an Indonesian man.

The country has been on edge for weeks following warnings that Islamic militants were planning something big. Backers of ISIS claimed responsibility for the attacks, although they claim to have used four suicide bombers, not three. A police spokesperson said all the attackers were identified as being affiliated with ISIS.

Following the attack, Ottawa updated its travel advisory for Indonesia, warning Canadians that they should exercise a “high degree of caution” there due to a “continuing threat of terrorist attacks” in the country.

Speaking to reporters in Waterloo, Ont., on Thursday, Prime Minister Justin Trudeau condemned the attacks and said Canadians’ “hearts go out to the people in Indonesia.”

He said Ottawa will be “supporting the Indonesian government” as necessary during the investigation and officials are following up on the reports of a Canadian victim.

Attack ripped through central business district

Jeremy Douglas, the UN Regional Representative for Southeast Asia, was travelling to a work meeting in a car Thursday when the first bomb went off.

"I was about 500 metres away," he told CTV's Canada AM from Jakarta. "We pulled to the front of the building, and as I got out the door, the second suicide bomber detonated. That was about 100 metres away.

"You could really feel it at that point … it was chaotic, so we rushed into the building."

Douglas said he heard a total of six explosions, and watched from his office as a gunfight unfolded in the streets below.

"We were watching it from upstairs… it was quite a scene," he said.

Douglas said the attack took place in the bustling central business district of Jakarta, where there are several international hotels, shopping malls and coffee shops.

He said he works out of Bangkok, but was in Jakarta to help craft a counter-terrorism strategy with government officials. "I just happened to be here at the wrong time," he said.

He said while Indonesia is generally a "very safe"country, there is an ever-present background threat due to groups that are sympathetic to al Qaeda and ISIS.

With files from The Canadian Press and The Associated Press