Police say the blast in the city of Dera Ghazi Khan occurred as a religious procession was passing the mosque .