NAIROBI, Kenya -- A Canadian national and five other people suspected of helping extremist gunmen stage a deadly attack in the Kenyan capital this week appeared in court on Friday as prosecutors investigated them for suspected terror offences.

A judge ordered five of the suspects held for 30 days while authorities look into the assault on the dusitD2 hotel complex that was carried out by al-Shabab, a group that is linked to al-Qaida and based in neighbouring Somalia.

Kenyan authorities say 21 people, including one police officer, were killed by the attackers, one of whom blew himself up beside a restaurant. Another four gunmen died.

Prosecutors suspect the alleged accomplices, including two taxi drivers and an agent for a mobile phone-based money service, of "aiding and abetting" the attackers who stormed the Nairobi complex on Tuesday afternoon and were killed by Wednesday morning, according to a court document. Prosecutors said they were pursuing more suspects in and outside Kenya.

Suspects who appeared in court were identified as Joel Nganga Wainaina, Oliver Kanyango Muthee, Gladys Kaari Justus, Guleid Abdihakim and Osman Ibrahim. Abdihakim is a Canadian national, according to prosecutors. Hussein Mohammed, another suspect who was arrested in Mandera county along the border with Somalia, was brought to court separately, prosecutors said.

"The investigations into this matter are complex and transnational and would therefore require sufficient time and resources to uncover the entire criminal syndicate," said Noordin Haji, director of public prosecutions. He said he has appointed a team of prosecutors to help ensure that the investigations are "meticulous and fast-tracked."

Canada has condemned the attack in Nairobi earlier this week.

A spokesman for Global Affairs Canada said Canadian officials are aware of reports that a Canadian citizen was arrested in Kenya and that consular officials are in contact with Kenyan authorities to gather additional information.

"Consular services are being provided to the family of the individual," said Global Affairs spokesman Philip Hannan, adding privacy laws prevent the disclosure of any further information.

Police earlier identified a Kenyan military officer as the father of another suspect in the assault. The son, Ali Salim Gichunge, as well as Violet Kemunto Omwoyo, were named as attackers in court documents.

"The attackers were in constant communications with several phone numbers which are located in Somalia," prosecutors said.

Gichunge's father, who is not believed to have been involved in the attack, was summoned for questioning about when he last saw his son and other details, a senior police official said. He spoke on condition of anonymity because he was not authorized to speak to the media.

The official said a total of 11 people were detained as part of the investigation.

The attack was denounced on Friday in Eastleigh, a Nairobi neighbourhood that is home to many ethnic Somalis and has been targeted in massive police operations against suspected extremist cells. Shop owners temporarily closed businesses to protest extremism, and crowds gathered.

Al-Shabab also carried out the 2013 attack at Nairobi's nearby Westgate Mall that claimed 67 lives, and an assault on Kenya's Garissa University in 2015 that killed 147 people, mostly students. While U.S. airstrikes and a multinational African Union force in Somalia have reduced the Islamic extremists' ability to operate, al-Shabab is still capable of carrying out spectacular acts of violence in retaliation for the Kenyan military's presence in Somalia.

The attackers who stormed the hotel complex opened fire and set off grenades, sending panicked people running for cover as security forces converged. Security camera footage released later showed a suicide bomber blowing himself up in a grassy area.

A hotel employee, seen in the footage walking past the bomber just before the explosion, described in an interview with Kenya's K24 television how he heard the man talking on a mobile phone.

"Where are you guys?" the agitated bomber said at least a couple of times, according to Abdullahi Ogelo, the employee. Ogelo, who later concluded the bomber had been talking to his accomplices, said the man was also moving his hand over his chest.

Seconds later, the bomber detonated in a flash and billowing smoke.

In the television interview, Ogelo said God saved him and gave him a "second chance."

----

With files from The Canadian Press