Gunmen injured at least two people before being shot dead during an attack at a Kabul hotel on Thursday.
The Serena hotel was widely considered the safest place for Westerners to stay while working in Afghanistan, Reuters reported.
The attackers apparently gained access through a rear door before opening fire in a restaurant, witnesses told Reuters.
Police entered the hotel and killed three gunmen before trapping a fourth inside a bathroom, Associated Press said. The militants smuggled weapons into the hotel by hiding them in their socks, according to AP.
Guests and staff remained safe after being rushed to safe rooms in the basement.
Agence France-Presse later said the fourth gunman was also killed.
"Four attackers who had managed to enter the Serena hotel are now dead. The area is now clear," Sediq Sediqqi, the interior ministry spokesman, told local TV, according to AFP.
Sediqqi also told reporters the gunmen appeared to be about 18 years old.
Elsewhere, in Jalalabad, 11 people were killed and 22 were injured on Thursday when Taliban militants engaged police in a gun battle in eastern Afghanistan.
United Nations staff and foreign observers have been using Serena hotel as a base to prepare for presidential elections in Afghanistan, Reuters said.
The hotel is also near the presidential compound and other important government buildings. It was attacked once before, in 2008, when seven people were killed by the Taliban. It was also hit by rockets in 2009 and 2010.
The Taliban has vowed to disrupt the elections which are planned for April 5.
More from GlobalPost: What the US doesn't get about the Middle East