The five-minute exchange, which could have easily escalated into a much bigger conflict, could heighten tensions at a time the U.S. is stepping up cross-border operations in a region known as a haven for Taliban and al-Qaida militants.
It also came as new Pakistani President Asif Ali Zardari was in New York meeting with Secretary of State Condoleezza Rice, and Afghan President Hamid Karzai was scheduled to meet with President 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 Adm. 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 flying 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 fired 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 an emotion-charged speech at the U.N. 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 neighbors, 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."
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."
The shooting comes amid a string of cross-border incidents, including a raid by American commandos into Pakistan's tribal areas Sept. 3 that angered many in Pakistan, and the apparent crash landing because of possible mechanical failure of a U.S. spy drone this week in Pakistan's tribal areas.
Maj. Gen. Athar Abbas, a Pakistani army spokesman, said last week that Pakistani field commanders have previously tolerated international forces crossing a short way into the country because of the ill-defined and contested nature of the mountainous frontier.
"But after the (Sept. 3) incident, the orders are clear," Abbas said. "In case it happens again in this form, that there is a very significant detection, which is very definite, no ambiguity, across the border, on ground or in the air: open fire."
On Wednesday, Pakistan's army said it had found the wreckage of a suspected surveillance drone in South Waziristan, but denied claims by Pakistani intelligence officials that troops and local residents shot it down.
Abbas said Pakistan's military was awaiting a full report from Afghanistan on Thursday's shooting, but that Pakistani units had "very clear" orders not to fire across the border.
In Washington, Defense Department spokesman Bryan Whitman said the coalition immediately requested an explanation from Pakistan for what he described as a "troubling" incident.
"It would be fairly hard to mistake a helicopter flying in that region as anything but (NATO) or U.S.," Whitman said.
Asked how Pakistani forces could mistake U.S. helicopters for enemy forces, especially since Taliban and al-Qaida forces don't have aircraft, Whitman said: "Only Pakistan can articulate their intent."
Pakistani civilian leaders have condemned the cross-border operations by U.S. forces, which have been authorized by Bush, while the army has vowed to defend Pakistan's territory "at all cost."
Pakistan's tribal areas have become a breeding ground for Taliban and al-Qaida militants, who are launching attacks inside Pakistan but also across the border into Afghanistan, where the levels of violence have reached record heights since the ouster of the Taliban from power in the U.S.-led invasion in 2001.
Shuja Nawaz, a prominent Pakistani military analyst, said Pakistan is in no position to seek a confrontation with the vastly superior U.S. military. But he said it "certainly doesn't want to be drawn in a situation where it allows the U.S. to act with impunity" because of the impact on its already-dented morale.
Nawaz said cross-border strikes could deepen animosity in Pakistan toward its alliance with Washington and strengthen the hand of Islamists and right-wing nationalists. Former Prime Minister Nawaz Sharif, perhaps Pakistan's most popular politician, could then be tempted to join those calling for Pakistan to break its ties with Washington, he said.
"That would be very dangerous," Nawaz said. "The United States needs to be very careful that it doesn't tip the balance."
Associated Press writers Steve Graham in Islamabad, Pauline Jelinek in Washington and Matthew Lee in New York contributed to this report.