An Afghan diplomat was injured when unidentified gunmen opened fire at him in the Pakistani capital, officials said on Friday.

Naqeebullah Ibrahimkhel, a third secretary in the Afghan Embassy, was wounded when the men fired at him while he was returning from a market in Sector F-10 of Islamabad late on Wednesday, Afghan Embassy spokesman Shams Zardasht said.

Mr. Ibrahimkhel, in-charge of education and student affairs at the Afghan Embassy, was hit by a bullet in the leg.

He was taken to the Pakistan Institute of Medical Sciences for treatment. Doctors described his condition as stable.

“We are not aware of the motives behind the incident and we demand that the Pakistani government should investigate it,” Mr. Zardasht said.

The armed men robbed Mr. Ibrahimkhel of his cell phone and money and tried to drag him into their car, he said.

Police officials claimed Mr. Ibrahimkhel was the victim of an attempted robbery.