A pair of gunmen shot a Swedish journalist on a crowded street in Kabul on Tuesday in a rare assassination-style killing of a foreigner, thousands of whom have lived openly in the city for more than a decade.

The journalist was outside a restaurant talking to security guards about an article he was working on when a pair of men in what was described as "traditional clothing" walked up, said Col. Najibullah Samsour, a senior police official. At least one of the men drew a pistol and fired a single shot into the journalist's face. The men then fled.

The man was identified by the Swedish Embassy as Nils Horner, 51, a journalist for Swedish Radio who had both British and Swedish nationalities.

The attack marked the first time in years that a foreigner appeared to have been specifically targeted and killed in Kabul. The journalist's death sent a fresh wave of panic through the sizable community of diplomats, journalists, aid workers and others who live and work in the Afghan capital.

The city once had a thriving, albeit limited, expatriate social scene. There were a handful of restaurants and bars that catered almost exclusively to foreigners - Afghans are legally barred from drinking - and regular parties at the lightly guarded homes in which many Westerners here live.

But the deteriorating security situation in many rural areas of Afghanistan and a number of high-profile attacks on Afghan officials, Western embassies and coalition forces in Kabul in recent years has forced many foreigners, especially diplomats, to live under tighter security restrictions.

In January, Taliban suicide attackers struck a Lebanese restaurant, Taverna du Liban, that had been a mainstay of Kabul's expatriate social scene. Of the 21 people killed, 13 were foreigners. The Taliban claimed responsibility for the attack, and said for the first time that they had specifically sought to kill Western civilians.

Since the attack on Taverna du Liban, other restaurants that are popular with foreigners have seen their business plummet. Many Westerners who had freely traveled around the city have either chosen to scale back their socializing or have been forced to do so by security restrictions put in place by the organizations for which they work.

There was no immediate claim of responsibility for the shooting Tuesday. It was not clear whether the gunmen were specifically targeting the journalist who was killed, whether they mistook him for someone else or if they were simply looking for a foreigner to shoot and spotted him.

Samsour, the police official, said the journalist had arrived in Kabul only a few days earlier and was staying at a guesthouse. He was apparently working on a story about the attack on Taverna du Liban when he was shot.

According to witnesses, the journalist was standing outside another Lebanese restaurant, Beirut, and was asking security guards there about a chef who survived the attack on Taverna du Liban.