The raid was carried out in the Shah Latif Town area of Karachi by the Countre-Terrorism Department (CTD) of the Sindh Police.
The raid acting on intelligence gathered from suspects arrested last month with explosive materials, officials said.
According to police, the suspects opened fire when security personnel entered the house, triggering a gun battle.
Four militants were killed in the exchange of fire, reportedly by shots fired by their own associates.
Deputy Inspector-General of CTD, Azfar Mahesar, said one suspect died at the scene, while three others succumbed to their injuries before reaching hospital.
Two CTD personnel were also injured in the operation and were taken to hospital, where they are reported to be in stable condition.
Security forces recovered weapons and explosive materials from the house, including five hand grenades, a sub-machine gun, detonators and electronic circuits.
Police said several accomplices managed to escape.
A search operation had been launched in the surrounding area under heightened security. (Xinhua/NAN)