Six people suspected of terror offences, including a Canadian national, have appeared in court following a devastating attack at a Nairobi hotel.

Prosecutors in Kenya allege that the suspects are responsible for "aiding and abetting" extremists who stormed the DusitD2 hotel complex on Tuesday afternoon.

Gunmen entered the hotel lobby and opened fire on people inside during the attack, while one militant blew himself up near a restaurant.

The extremists killed 21 people and carried out an overnight siege. Al-Shabaab, the Somali Islamist extremist group, claimed responsibility for the attack.

By Wednesday morning all four of the gunmen had been killed by Kenya's special forces.

Nairobi hotel attack – in pictures Show all 23 1 /23 Nairobi hotel attack – in pictures Nairobi hotel attack – in pictures Cars are seen on fire at the scene where explosions and gunshots were heard at the Dusit hotel compound, in Nairobi, Kenya Reuters Nairobi hotel attack – in pictures An injured man is evacuated from the scene of an explosion at a hotel complex in Nairobi's Westlands suburb AFP/Getty Nairobi hotel attack – in pictures A soldier takes cover next to a bullet ridden window EPA Nairobi hotel attack – in pictures People run for cover during gunfire and explosions in Nairobi EPA Nairobi hotel attack – in pictures Kenyan security forces take position following an explosion at a hotel complex in Nairobi's Westlands suburb AFP/Getty Nairobi hotel attack – in pictures Security forces on the scene of an explosion in Nairobi AP Nairobi hotel attack – in pictures Cars burn at the scene of an explosion in Nairobi AP Nairobi hotel attack – in pictures People are led away from the scene of an explosion at a hotel complex in Nairobi AFP/Getty Nairobi hotel attack – in pictures A soldier takes cover as gunfire continues at the scene of a suspected terror attack in Nairobi EPA Nairobi hotel attack – in pictures Armed plain clothes officials secure the damaged entrance of a hotel during ongoing gunfire and explosions in Nairobi EPA Nairobi hotel attack – in pictures Members of security forces take cover at the scene Reuters Nairobi hotel attack – in pictures People are evacuated from the scene of a suspected terror attack in Nairobi Reuters Nairobi hotel attack – in pictures Cars burn after an explosion in Nairobi AP Nairobi hotel attack – in pictures A member of security forces holds a weapon at the scene Reuters Nairobi hotel attack – in pictures Security forces advance at the scene of a suspected terror attack in Nairobi Reuters Nairobi hotel attack – in pictures Cars burn at the scene of an explosion in Nairobi Reuters Nairobi hotel attack – in pictures A glass damaged by bullets at the scene Reuters Nairobi hotel attack – in pictures Security personnel on the scene of a suspected terror attack in Nairobi Reuters Nairobi hotel attack – in pictures A woman is helped at the scene of an explosion in Nairobi Reuters Nairobi hotel attack – in pictures Security forces advance at the scene of a suspected terror attack in Nairobi Reuters Nairobi hotel attack – in pictures Security personnel on the scene of a suspected terror attack in Nairobi Reuters Nairobi hotel attack – in pictures Undercover police are on the scene of a blast in Nairobi AP Nairobi hotel attack – in pictures Security personnel on the scene of a suspected terror attack in Nairobi AP

On Friday a judge decided that five of the additional suspects should be held for 30 days. while authorities investigated the massacre.

Prosecutors confirmed they were pursuing more suspects both within Kenya and abroad.

The group of suspects were idenitified in court as Joel Nganga Wainaina, Oliver Kanyango Muthee, Gladys Kaari Justus, Osman Ibrahim and Guleid Abdihakim.

Two of the suspects are taxi drivers, one is an agent for a phone-based money service and Mr Abdihakim is a Canadian national.

Officials in Ottawa are aware of reports that Mr Abdihakim is Canadian and are in touch with Kenyan authorities, said government spokesman Philip Hannan.

A total of 11 people have been detained as part of the investigation.

"The attackers were in constant communications with several phone numbers which are located in Somalia," 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, Kenya's director of public prosecutions.

Support free-thinking journalism and attend Independent events

Mr Haji said he had appointed a team of prosecutors so that the investigation would be "meticulous and fast-tracked".