He said it was not clear if the blast had been caused a hidden explosive device, a grenade or a suicide bomber.
Tauqir Zaidi, one of the mourners, told the Reuters agency: "One of our men was martyred yesterday and one today. We were taking the coffin to the graveyard, reciting mourning hymns, when suddenly this blast happened."
There was no immediate claim of responsibility for the attack but there have been previous outbreaks of sectarian violence between Sunni and Shia Muslims in Dera Ismail Khan, part of North West Frontier province bordering the South Waziristan tribal region.
Shias account for about 20 per cent of Pakistan's 160 million-strong population.