An Afghan diplomat was shot dead on Monday in the Afghan consulate in Karachi in what was described as a personal dispute, Pakistani officials said.

The consulate's third secretary was killed by a private guard, who had been arrested, police official Saqib Ismail told Reuters.

"The guard used his automatic weapon, firing multiple bullets," Ismail said, adding that the guard was also an Afghan national.

Another police official, Deputy Inspector General Azad Khan, told reporters the shooting appeared to be the result of a personal dispute.

Afghan Ambassador to Pakistan Omar Zakhilwal confirmed the shooting on his official Facebook account.

"Firing inside Afg Consulate General in Karachi at around 12:30 pm today ... has been carried out by an Afghan guard inside the compound resulting in fatality of one of our diplomats," Zakhilwal wrote.

"It seems to be a personal dispute related criminal act."