A Pakistani diplomat was shot and killed in Afghanistan on Monday, officials said, but the motive for the deadly attack was not immediately clear.

Two assailants riding a motorbike opened fire on Nayyar Iqbl Rana as he bought goods at a shop in the eastern city of Jalalabad, Pakistan's Ambassador to Afghanistan Zahid Nasrullah Khan told AFP.

"When he went to the hospital he was pronounced dead," Khan said.

Nangarhar governor spokesman Attaullah Khogyani confirmed the deadly attack.

"Police have launched an investigation into the incident. No arrests have been made so far," Khogyani told AFP.

Rana was the assistant to the consul general in Jalalabad, the capital of restive Nangarhar province, which borders Pakistan.

Khan said he had "absolutely no idea" why Rana, a father of five, was targeted.

Despite escalating violence across Afghanistan diplomats are rarely killed in the country where they are protected by very tight security.

The incident comes a few months after two Pakistani diplomats working at the same consulate in Jalalabad were kidnapped and later freed.