Police raided a militant hide-out in southern Pakistan, triggering a gunbattle during which three homicide bombers blew themselves up along with a handcuffed prisoner, officials said.

Meanwhile, a bomb blast caused a train to derail in eastern Punjab province, killing three people and wounding 15 others, authorities said. The prime minister said he had ordered an investigation into the blast.

Pakistan is battling a wave of violence by Islamic extremists in its towns and cities and in the lawless border area with Afghanistan in the northwest, where Taliban and Al Qaeda fighters have established bases.

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, who gave 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. He died in the explosions, Khattak said.

The militants were believed to be part of Lashkar-e-Jhangvi, an extremist group linked to Al Qaeda, and police said a tip from a captured member of the group led security forces to the house.

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 Qaeda, 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 that 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 homicide attacks they said was revenge.