The two suspects were killed, but nobody else was hurt in the blasts.
The incident occurred before dawn on Friday when dozens of police officers raided a house in Quetta after receiving a tip that suspects were hiding there, police official Muhammad Shahban said.
The shootout occurred near the planned route for a procession on Sunday of minority Shia Muslims for the mourning period of Ashura, which is especially important for Shia Muslims.
The identity of the slain pair was not immediately known, but Shahban said they suspect they had links with Lashkar-e-Jhangvi, a Sunni group which has been accused by authorities of killing thousands of Shia Muslims in recent years.
The police raid on Friday came hours after authorities in Islamabad said they had asked all the four provincial governments to beef up security to prevent any sectarian violence ahead of Ashura.
Specially trained commandos will be deployed across Pakistan for the first time to prevent sectarian bloodshed during Shia mourning processions this weekend, officials said.
Many Shia cut themselves in
remembrance of Imam Hussain
The commandos will be sent out "on an urgent basis to deal with any situation," said Lieutenant General Safdar Hussain, army commander in North West Frontier Province.
In a statement on Thursday, he said troops had been ordered to stay alert in all places where sectarian clashes may happen and "pre-empt any terrorist acts" during the Ashura ceremonies.
The unprecedented step is intended to limit violence during Ashura, when minority Shia traditionally stage graphic displays of self-harm.
The ceremony starts late on Saturday.
In recent years, Ashura has been marred by killings in Pakistan, mostly of Shias.
Last year, Sunni attackers hit a Shia procession in Quetta, leaving 46 people dead. Quetta is the capital of the southwestern province of Baluchistan.
Ashura marks the first 10 days of the Islamic month of Muharram, reaching its climax on the tenth day. The days mourn the death of Imam Hussain, the Prophet Muhammad's grandson, who died in battle in 680 AD.
His death led to the split between Shia and Sunnis.
Many Shia mark the day by parading the streets of major cities, beating their chests and whipping themselves with knives fixed to iron chains.
Imam Hussain's shrine is in the
Iraqi city of Karbala
Reciting elegies, participants carry black banners and march behind the replicas of Hussain's tomb in Iraq.
The processions have previously sparked clashes with Sunnis, who make up 80% of Pakistan's 150-million population.
Some Sunnis oppose the public displays of grief, one of a number of doctrinal differences between the sects.