Meanwhile, a bomb blast caused a train to derail in eastern Punjab province, killing three people and injuring 15 others, authorities said. The prime minister said he had ordered an investigation into the blast.
The three militants who died in the raid in Karachi were suspected of planning an attack on a "high-profile" target in the city, said Sindh police chief Babar Khattak, giving no more details.
"Police definitely averted a big attack from happening in this city," he said.
Police seized at least 22 pounds of explosives, two suicide jackets, seven pistols and 12 hand grenades from the Karachi house, which was badly damaged by the explosions.
The prisoner whose body was discovered in the rubble was identified as a wealthy supplier of fuel and goods to U.S. and NATO forces in Afghanistan, senior police official Aleem Jaffry told The Associated Press.
It was unclear how he died.
The militants were believed to be part of Lashkar-e-Jhangvi, an extremist group linked to al-Qaida, and police said a tip from a captured member of the group led security forces to the house.
Pakistan is experiencing a wave of violence amid ongoing military offensives against insurgents in its northwest, where Taliban and al-Qaida fighters have established bases.
Karachi, Pakistan's commercial capital, is considered a militant hub and has witnessed plenty of political and religious violence over the years.
Lashkar-e-Jhangvi is one of the most feared militant groups in Pakistan. The Sunni Muslim group is often associated with sectarian attacks, including suicide bombings in mosques.
Its fighters were trained in camps in Afghanistan and have joined terror attacks sanctioned by al-Qaida, including December 2003 bombings targeting former Pakistani President Pervez Musharraf.
Pakistan is still reeling from a massive weekend blast at the Marriott Hotel in Islamabad which killed at least 53 people and wounded some 270.
Friday's raid took place just hours before Prime Minister Yousaf Raza Gilani was due to arrive in Karachi, said Hasan Sardar, a spokesman for the prime minister's office.
There was no immediate suggestion that the men were targeting the leader, whose motorcade was shot at recently near the capital, Islamabad.
Meanwhile, a government official said at least 11 militants were killed Friday and another 16 wounded in ongoing clashes between security forces and militants in the Bajur tribal region.
Hundreds of suspected militants have been killed in Bajur in recent weeks as the army has staged an offensive against what it has called a sanctuary for insurgents.
The offensive has gained U.S. plaudits, but in its wake, the Pakistani Taliban have claimed responsibility for a series of suicide attacks they said was revenge.
RSS feeds | Slideshow archive | ABC13 wireless | Help solve crimes