Gunmen on Thursday evening stormed the Serena Hotel in Kabul, killing nine people in a luxury lodging in the capital city that has been the target of attacks in the past, Afghan officials said.
The Taliban claim to have undertaken the attack.
Deputy Interior Minister Gen. Mohammad Ayub Salangi told The Associated Press that the Afghan fatalities included two men, two women and one child while the foreigners included two women and two men.
Salangi didn't provide the nationalities of the foreigners who were killed. All the victims were gunned down in the hotel restaurant, he said.
Interior Ministry spokesman Sediq Sediqqi told Reuters all four gunmen were dead and security forces were in control of the hotel. Armored vehicles carrying foreigners were seen leaving the hotel Friday morning, but otherwise the area appeared calm.
On Thursday, attackers appear to have entered the hotel around 6 p.m. with pistols hidden in their socks and waited three hours to start their attack, he said.
They fired on guests and then hid in bathrooms when security forces arrived, he added. The gunmen appeared to be under 18 years old.
Two guards had been wounded, he said. No other casualties were confirmed.
The attack came just under three weeks before April 5 elections, which should be the first time in Afghanistan's history that one elected government hands over power to another.
The hotel was attacked in 2008 by a suicide bomber and six people were killed.
Taliban spokesman Zabihullah Mujahid claimed responsibility for the assault on the Serena hotel. "Our people, if they decide to attack any place, they can do it," he said.
Mujahid said the gunmen targeted foreigners and dignitaries gathered at the hotel for a celebration marking the Persian new year, Nowruz.
The Taliban has threatened to disrupt elections, and earlier Thursday some of its members staged a multipronged attack on a police station in the eastern city of Jalalabad. The hours-long assault left 10 police officers and a civilian dead, officials said.
The attack began with insurgents sending a suicide bomber who detonated his explosives outside the police station, located near the residence of the province's governor, Attahullah Ludin.
Al Jazeera's Jane Ferguson, reporting from Kabul, said the attack started around 5:30 a.m. local time in District One of Jalalabad and that the ensuing gun battle lasted for more than four hours.
"The police headquarters came under attack after five huge explosions hit the city," she said.
Sources told Al Jazeera that "gunmen with suicide vests entered the police station" while 12 police officers were on duty.
In an email in Pashto — the language most often spoken by the Taliban — Mujahid said the Taliban had staged the Jalalabad attack.
It came after a suicide bomber killed at least 15 people Tuesday in an attack on a busy marketplace in Maimana, the capital of Faryab province in northern Afghanistan.
On Thursday, the initial explosion was followed by Taliban gunmen who laid siege to the station and remotely detonated two bombs nearby.
Ten policemen and one civilian were killed while 14 policemen and 20 civilians were wounded in the attack, said officials.
All seven insurgents involved in the multipronged attack were killed, said Deputy Interior Minister Gen. Mohammed Ayub Solangi.
According to police spokesman Hazrat Hussain Mashrakiwal, the nearby building of Afghan state-run radio and television was also heavily damaged in the explosions.
A bomb hidden in a motorized rickshaw and a second one in a vegetable cart near the police station were also detonated during the attack, likely by remote control, said the governor's spokesman, Ahmad Zia Abdulzai.
Solangi said the insurgents were armed with heavy weapons and automatic machine guns. The battle was fierce, with the Afghan troops fighting their way out and chasing the attackers down the street.
Doctors at nearby hospitals said as many as 20 civilians were wounded, mostly from shrapnel from the initial suicide car bombing, but that the majority were treated and released quickly. Two of the wounded were said to be in serious condition.
The Taliban have carried out numerous attacks in Jalalabad and the country's eastern region, which is their traditional stronghold, along with southern Afghanistan.
As violence surges in Afghanistan, outgoing President Hamid Karzai, has refused to sign a security agreement with the U.S., which would allow U.S. forces to remain in the country in 2015 and beyond, and has said he would not do so until peace is achieved.
All 10 presidential candidates for the April 5 elections have said they would sign the security agreement if elected. But Karzai does not want his legacy to include a commitment to extending a foreign military presence.
Al Jazeera and wire services