Police say gunmen riding a motorcycle have opened fire on a vehicle carrying a senior police officer in southern Pakistan, killing him and his guard before fleeing.

Zulfiqar Larik, deputy inspector general of police, says Friday's drive-by shooting took place in Karachi, the capital of southern Sindh province.

He says it was unclear who was behind the shooting but suspicion fell on local militants who often claim responsibility for attacks on security forces in Karachi and elsewhere in the country.

Karachi is Pakistan's largest city and it is also considered a hiding place for Pakistani Taliban and foreign militants.