Two Canadians were among the nine people killed when Taliban gunmen attacked a luxury hotel in Afghanistan, a Foreign Affairs official said on Friday.

The attack took place on Thursday night local time, when four men with pistols stuffed in their socks stormed the Serena Hotel in Kabul, a popular hotel for the diplomatic community. All of the gunmen were reportedly killed by Afghan troops.

Foreign Affairs Minister John Baird condemned the attack, calling it “brazen and cowardly.”

Baird said the two slain Canadians were development workers not employed by the government and that consular officials in Kabul were gathering more information. The victims were identified as Roshan Thomas of Vancouver and Zeenab Kassam of Calgary.

Baird said the shooting was "a tragedy for the families," and called for Afghan police to launch a thorough investigation.

"This is an example where people who are working in Kabul trying to promote values, development are under attack and we hope obviously there will be an investigation and people will be brought to justice," Baird said, before boarding a plane en route to the Netherlands for a nuclear security summit.

The Interior Ministry initially gave conflicting accounts of the victim's nationalities, but by late Friday said they included citizens of Canada and Paraguay. The U.S. embassy said a dual U.S.-Bangladeshi citizen was also killed. The foreign minister of Paraguay, Eladio Loizaga, told Reuters another civilian killed was a former Paraguayan diplomat who was in Afghanistan as an election observer.

The Afghan capital has been hit by several attacks, but authorities appeared stunned that the militants had managed to get through the tight security at the Serena Hotel — considered one of the safest places to stay in Kabul.

The attack in Kabul came just hours after the Taliban killed 11 people in an audacious assault on a police station in the city of Jalalabad in eastern Afghanistan.

Afghanistan's intelligence service displays some of the weapons and belongings of attackers on the Serena hotel on Thursday, during a press conference Friday. (Anja Niedringhaus/Associated Press)

The assailants were killed in both standoffs, but made their point: Afghan forces face a huge challenge in securing upcoming elections next month in what will be a major test of their abilities as foreign troops wind down their combat mission at the end of this year.

The attacks show the Taliban are following through on their threat to use violence to disrupt the April 5 vote, which will be the first democratic transfer of power since the 2001 U.S.-led invasion that ousted the Islamic militant movement. President Hamid Karzai is constitutionally barred from seeking a third term.

Taliban spokesman Zabihullah Mujahid claimed responsibility for the assault on the Serena Hotel and the earlier attack in Jalalabad, an economic hub near the border with Pakistan.

"Our people, if they decide to attack any place, they can do it," he said.

4 attackers killed at Serena Hotel

The assault on the heavily fortified Serena Hotel lasted some three hours.

Four Taliban fighters snuck past security early on Thursday evening and hid inside the building for three hours before drawing the pistols hidden in their socks and opening fire on diners inside the hotel's restaurant, according to interior ministry spokesman Sediq Sediqqi.

A view of the Serena Hotel in Kabul a day after it was attacked by Taliban gunmen. Nine people were killed, including two Canadians. (Mohammad Ismail/Reuters)

They then battled Afghan special forces as terrified guests hid in rooms or fled to hotel bunkers. All the Taliban gunmen were shot dead.

During the attack guests crouched in bathrooms with the lights turned off as they listened to gunfire and people running up and down the hallways.

"I never heard an explosion or anything. Only firearms and possible rocket-propelled grenades," one senior U.N. official said in a text message from his darkened room.

One of the hotel's main saferooms, which was packed with guests and Afghan members of parliament, filled with smoke from a fire in the kitchen. "It was hard to breathe. People started putting wet napkins on their faces," one witness said.

French news agency Agence France Presse said its Afghan reporter Sardar Ahmad, his wife and two young children were killed in the attack.

All the 18 U.N. staff members known to be inside had been accounted for, according to a U.N. official.

Armoured vehicles carrying foreigners were seen leaving the hotel Friday morning, but otherwise the area appeared calm.

Attacks in heavily secured areas

In Jalalabad, the violence began before dawn on Thursday when a suicide bomber blew up his explosives-laden car outside the police station, located near the palatial residence of Nangarhar provincial Gov. Attaullah Ludin.

Six gunmen rushed into the station as two more bombs exploded nearby — one hidden in a motorized rickshaw and another in a vegetable cart.

Afghan policemen patrol the entrance of the Serena hotel. (Anja Niedringhaus/Associated Press)

That prompted a fierce battle that lasted more than four hours, with Afghan police and soldiers chasing gunmen down the street amid gunfire and smoke billowing into the blue sky. Security forces killed seven attackers, Salangi said Thursday.

Police said the attack killed 10 officers, including a city district police chief, and a university student caught in the crossfire. Fifteen policemen were also wounded.

Mujahid, the Taliban spokesman, said the attackers wore suicide vests and killed nearly 30 police officers. The Islamic militant group frequently exaggerates casualty figures.

The initial suicide bombing badly damaged the nearby state-run Afghan radio and television building, shattering its windows.

The Taliban have carried out numerous attacks in Jalalabad, Kabul and elsewhere in the east. But the choice of a police station as a target reflected an effort to show they can still penetrate heavily secured areas despite numerous U.S. and Afghan offensives against them in recent years.

Afghanistan's upcoming elections include provincial votes, but the most closely watched is the presidential race. Karzai's successor will guide the country for the next five years as most U.S. and allied forces leave the country by the end of 2014.