An Afghan policeman opened fire at a Kabul hospital run by a US charity on Thursday, killing three Americans including a doctor, in the latest deadly attack targeting foreign civilians in the city.
The gunman shot himself in the incident outside the CURE International hospital and was detained by police after being treated inside, officials said, adding that the motive for the killing was not clear.
"He opened fire as the foreign nationals were entering the hospital, tragically killing three," Seddiq Sediqqi, spokesman for the interior ministry, told AFP.
Health minister Soraya Dalil said the victims were a US doctor who had worked for CURE for seven years and an American father and son visiting the facility.
She added that the attacker had been on duty guarding the hospital when he started shooting.
The US embassy condemned the deaths of the three Americans, saying that "this act of terror deprives the citizens of Afghanistan of valuable medical expertise.
"Our condolences and sympathy to the families of those killed and injured while selflessly working towards better future for Afghanistan," it said.
CURE released a statement confirming that three people including a doctor were killed, and two others were injured.
"The shooter... was initially treated at the CURE Hospital and has now been transferred out of our facility into the custody of the government of Afghanistan," it added.
Kabul has been hit by a spate of attacks targeting foreign civilians this year, including a Lebanese restaurant where 21 people died, an attack on a luxury hotel and the daylight shooting of a Swedish radio journalist.
Last month Taliban militants attacked a Kabul guesthouse used by Roots of Peace, a US anti-landmine charity, killing two people including a girl.
And this month Associated Press (AP) photographer Anja Niedringhaus was shot dead by a police commander in the eastern province of Khost in an attack which also left her Canadian colleague Kathy Gannon badly wounded.
That killing came on the eve of presidential elections to choose a successor to Hamid Karzai as US-led combat troops withdraw from Afghanistan after 13 years of fighting Taliban insurgents.
CURE International is a non-profit organisation founded in 1998, based in Pennsylvania and working in 29 countries including conservative Muslim Afghanistan.
It describes itself as an "unapologetically Christian organisation" on its website, but says that it offers "treatment regardless of gender, religion, ethnicity, or ability to pay".
Its hospitals and health programmes specialise in treating children with conditions including clubfoot, cleft lips, burn injuries and brain diseases.
CURE International took over the hospital in west Kabul in 2005 at the invitation of the Afghan government, and treats 37,000 patients a year at the site, focusing on maternity and paediatric care.
There was no immediate comment from Taliban spokesmen after the shooting.
Preliminary results from the April 5 presidential election are due to be released on Saturday.
After about 80 percent ballots were counted, former foreign minister Abdullah Abdullah was ahead of his main rival Ashraf Ghani.
The incoming president will have to impose security as 51,000 NATO combat troops pull out by the end of this year, as well as strengthening an economy reliant on declining aid money.
Eight candidates ran in the election, with polling day hailed as a success by Afghan officials and foreign allies.
Voters turned out in force and the Taliban failed to launch a major attack despite threats to disrupt the vote.