KABUL, Afghanistan (AP) -- Four men with pistols stuffed in their socks attacked a luxury hotel in Kabul on Thursday, opening fire in a restaurant and killing nine people, including four foreigners, officials said.
The attack came just hours after militants killed 11 people in an audacious assault on a police station in eastern Afghanistan.
Afghan authorities initially said only two security guards had been wounded in the brazen assault on the Serena hotel in Kabul. Deputy Interior Minister Gen. Mohammad Ayub Salangi later 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.
He said they were killed Thursday night in a restaurant at the Serena hotel -- considered one of the safest places to stay in Kabul. Salangi didn't provide the nationalities of the foreigners who were killed.
All the victims were gunned down in the hotel restaurant, he said.
The assailants were killed in both standoffs, but made their point: Afghan forces face a huge challenge in securing upcoming elections 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 the disrupt 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.
The violence began before dawn Thursday when a suicide bomber blew up his explosives-laden car outside the police station in Jalalabad, 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.
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 and wounded 15 policemen.
The Taliban spokesman Mujahid 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.
Hours later, four young men entered the Serena hotel at about 6 p.m., telling guards they were going to dinner, officials said. To enter the hotel, guests must pass through an exterior gate and undergo a metal detector search and pat down.
Inside, they drew the pistols hidden in their socks and opened fire, Interior Ministry spokesman Sediq Sediqqi said. Bursts of gunfire could be heard from outside the hotel as Afghan troops cordoned off the area.
The attackers appeared to be about 18 years old and all were killed, Sediqqi said, adding that gunfire wounded two hotel security guards.
Armored vehicles carrying foreigners were seen leaving the hotel Friday morning, but otherwise the area appeared calm.
In a separate statement, Mujahid said the gunmen targeted foreigners and dignitaries gathered at the hotel for a celebration marking the Persian new year, Nowruz. He said Thursday's attacks in Kabul and Jalalabad show the vulnerability of government forces against determined militants.
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.
As part of the withdrawal process, Afghan authorities on Thursday released dozens of prisoners who had been held by foreign troops, including some 40 who had been detained by British forces in southern Helmand province, officials said.
The freeing of prisoners detained by international troops from the Parwan Detention Center has strained relations between Washington and Karzai, particularly in the wake of the Afghan leader's increasingly anti-American rhetoric and refusal to sign a long-negotiated bilateral security deal that would allow thousands of American and allied troops to stay in the country beyond the 2014 deadline.
The U.S. military has said some of those set free were directly linked to attacks that have killed or wounded dozens of U.S. or coalition personnel, as well as Afghan security forces and civilians.
British Embassy spokesman Maj. Tim James said Britain disagreed with Thursday's release but "has to respect it because it is an Afghan decision."
James declined to discuss specific charges facing the men, saying only that "we believed that we had enough evidence against these individuals to merit them going into the Afghan judicial system."
James said 77 were released -- of which 39 were former British detainees. Abdul Shakoor Dadras, a member of the Afghan review panel, said 55 were released Thursday, including 40 who had been held by British forces.
The European Union, meanwhile, announced that a mission to observe the elections was underway.
Associated Press writers Rahmat Gul in Jalalabad, Afghanistan, and Rahim Faiez contributed to this report.