Two unknown gunmen riding a motorbike opened fire at people who were coming out of a seminary after offering night prayers Friday, a Xinhua report citing Geo TV said.
Two men died on the spot while another was injured in the attack.
The injured man later succumbed to injuries in the Pakistan Institute of Medical and Health Sciences, Islamabad.
Police said the slain people were religious scholars and the militants fled the scene after attacking them.
In a separate incident in Bhakkar area of Punjab province, six people were killed and eight injured in firing between two religious groups outside a seminary.