An unidentified German woman and an Afghan guard were killed at a guest house in the Afghan capital when insurgents stormed the premises, police said.
An unidentified Finnish woman was also reported missing and possibly kidnapped after the attack.
No group has claimed responsibility and none of the attackers had been caught, but security officials and foreign embassies have been warning that the Afghan Taliban and foreign-linked Isis (Islamic State) militias would likely stage high-profile attacks in the capital as the holy month of Ramadan is set to begin next week.
The guard at the entrance was reportedly beheaded, a gruesome method often used by Isis and generally not practiced by the Taliban.
Then, according to a spokesman for the Interior Ministry, the attackers went to a second-floor room where the two women were asleep, shot one dead and abducted the other.
Security officials said two additional foreign women in the house were unharmed and that an intensive investigation was underway to find the assailants. The Embassy of Finland confirmed that a Finnish citizen is missing.
The guest house is operated by a Swedish aid and development charity called Operation Mercy, and all of its foreign employees are believed to stay there. The local director of the group, Scott Breslin, told news services that it was holding a crisis meeting, but he gave no details about the attack or the victims.
Police and neighbours said five foreigners lived in the guest house, dressed in modest Afghan clothing and spoke the Afghan Dari language. There was some local speculation that they were Christian missionaries. Several missionary-run charities have operated quietly in Kabul for years, but they remain natural targets for Islamist extremist groups.
The guest house and office of Operation Mercy are located in a rapidly developing section of Kabul that includes the new parliament, the American University, several newly built ministries and the home of President Ashraf Ghani.
In a separate attack, two Afghan employees of the Anti-Corruption Justice Centre, an agency that works with the attorney-general's office, were shot dead on their way to work, police said. Officials have been expecting threats and attacks on police, courts and prisons during this period.
The last major insurgent attack in Kabul came on March 8, when Isis militants invaded a large military hospital disguised as medical workers and gunned down more than 30 patients, staff members and visitors.
In the past week, Isis gunmen and suicide bombers attacked a government media compound in eastern Jalalabad city, leaving three people dead, and Taliban fighters struck a bank in the southern city of Gardez.
Today's incident was the first attack against foreigners in the capital in recent months, but it followed a number of similar incidents in the past several years.
Last August, two foreign faculty members at the nearby American University of Afghanistan, one American and one Australian, were kidnapped from their vehicle just outside the university gates. Their whereabouts are still unknown, but they appeared in a Taliban video in January which included a demand for ransom.
A number of foreign charity and development workers, including women, have been abducted in Afghanistan over the years, and several have been released after ransom was paid. Kidnappings are often carried out by criminal gangs who sometimes turn their captives over to the Taliban.