Pakistan warned U.S. troops not to intrude on its territory Friday, after the two allies traded fire along the volatile border with Afghanistan.

The five-minute clash Thursday adds to already heightened tensions at a time the United States is stepping up cross-border operations in a region known as a haven for Taliban and al-Qaeda militants.

The clash — the first serious exchange with Pakistani forces acknowledged by the U.S. — follows a string of other alleged border incidents and incursions that have angered many along the Pakistan-Afghanistan border.

Speaking in New York, Pakistan's president tried to downplay the incident, saying only "flares" were fired at foreign helicopters that he said strayed into his country from Afghanistan.

U.S. and NATO military officials said the ground troops and helicopters were in Afghan territory.

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

Police raid militant hideout in Karachi

The escalating violence in Pakistan was also felt as far south as Karachi.

Police raided a militant hideout Friday in Pakistan's largest city, triggering a shootout during which three suicide bombers blew themselves up. The body of a man held in handcuffs was found in the rubble, police said.

The three men were suspected of planning an attack on a "high-profile" target in Karachi, said Sindh police Chief Babar Khattak, giving no more details. The police raided the house in Karachi on a tip from a leader of an al-Qaeda-linked militant group, Khattak said.

"Police definitely averted a big attack from happening in this city," he said.

Police seized at least 10 kilograms 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.

Clash occurs as Zardari visits New York

On Friday, Pakistani government spokesman Akram Shaheedi urged U.S.-led coalition forces "not to violate territorial sovereignty of Pakistan as it is counterproductive to the war on terror."

"It has been Pakistan's policy that we will not allow anyone to violate our sovereignty, and we will continue to defend our territorial sovereignty," he said Friday.

The clash occurred as new Pakistani President Asif Ali Zardari was in New York meeting with U.S. Secretary of State Condoleezza Rice, and Afghan President Hamid Karzai was scheduled to meet with U.S. President George W. Bush on Friday.

Two American OH-58 reconnaissance helicopters, known as Kiowas, were on a routine patrol in the eastern province of Khost when they received small arms fire from the Pakistani border post, said Tech. Sgt. Kevin Wallace, a U.S. military spokesman in Bagram. There was no damage to aircraft or crew, officials said.

U.S. Central Command spokesman Rear Admiral Greg Smith said the helicopters had been escorting U.S. troops and Afghan border police. When the helicopters were fired on, the ground forces fired rounds meant not to hit the Pakistani troops, but "to make certain that they realized they should stop shooting," Smith said from Centcom headquarters in Florida.

The Pakistani forces fired back during a skirmish that lasted about five minutes. The joint patrol was moving about a mile inside Afghanistan, with the helicopters above, Smith said.

The Pakistani military disputed the U.S. version, saying its troops fired warning shots when the two helicopters crossed over the border and that the U.S. helicopters fired back.

"When the helicopters passed over our border post and were well within Pakistani territory, [our] own security forces fires anticipatory warning shots. On this, the helicopters returned fire and flew back," a Pakistani military statement said.

In New York, Zardari said his military fired only "flares" at foreign helicopters that he claimed had strayed across the border from Afghanistan.

Zardari said before his meeting with Rice that his forces fired only as a way "to make sure that they know that they crossed the border line."

Later, in a speech at the UN General Assembly, Zardari vowed to continue the fight against terrorists but warned against allied incursions into Pakistan.

"Just as we will not let Pakistan's territory to be used by terrorists for attacks against our people and our neighbours, we cannot allow our territory and our sovereignty to be violated by our friends," Zardari said.

"Unilateral actions of great powers should not inflame the passions of allies," he said.

The Pakistani military said the matter was "being resolved" in consultations between the army and the NATO force in Afghanistan. A NATO statement said the militaries were "working together to resolve the matter."