ISLAMABAD, Pakistan (CNN) -- U.S. and Pakistani troops exchanged fire Thursday along the Pakistani-Afghan border minutes after the Pakistani military fired shots at two American helicopters that were providing cover for the troops, a U.S. military spokesman said.



Pakistan says it shot at two U.S. OH-58D helicopters like this one pictured in a U.S. Army photo.



The U.S. Army OH-58D Kiowas, part of NATO's International Security Assistance Force mission in Afghanistan, were patrolling the Pakistani-Afghan border when the Pakistani military fired on them, NATO and U.S. officials said.



The Pakistani military said the fire was warning shots, and President Asif Ali Zardari said it was flares. Both Zardari and the Pakistani military said the helicopters had crossed into Pakistani territory -- a charge U.S. officials denied.



Rear Adm. Greg Smith of U.S. Central Command said the helicopters were providing cover for a small U.S. military unit accompanying an Afghan border police unit on a routine patrol.



After the shots were fired at the helicopters, Smith told CNN, the U.S. troops fired "suppressing rounds" into a nearby hill to get the Pakistanis to stop. That prompted the Pakistani troops to stop firing at the helicopters and fire instead in the direction of the troops, he said. The U.S. troops then returned fire, Smith said.



No injuries were reported in the five-minute incident.



Smith and other U.S. officials said the helicopter crews did not fire back.



But the Pakistanis disagreed, asserting in a written statement that the helicopters "returned fire" after the initial shots were fired.



"The helicopters passed over our border post and were well within Pakistan territory" at the time that "security forces fired anticipatory warning shots," the Pakistani statement said.



After the shots were fired, "the helicopters returned fire and flew back."



The Pakistani statement did not mention exchanging fire with ground troops and did not identify the shots as flares, as Zardari did in New York in an appearance with U.S. Secretary of State Condoleezza Rice.



"They are flares," he said in response to a question asking why the Pakistani military was firing on NATO helicopters. "Just to make sure that they know they crossed the border line."



Asked if such warnings will continue, he replied, "Sometimes the border is so mixed that they don't realize that they crossed the border."



Rice, off camera, agreed that "the border is very unclear" and "inhospitable."



Pentagon spokesman Bryan Whitman reiterated the United States' stance that the two helicopters were over Afghan territory. "The Pakistanis need to provide the U.S. a reason to why this took place," he said.



The ISAF issued a news release saying that "ISAF helicopters received small-arms fire from a Pakistan military checkpoint along the border near Tanai district, Khowst."



"At no time did ISAF helicopters cross into Pakistani airspace." The ISAF did not mention ground troops or say whether the helicopters returned fire.



Both the ISAF and Pakistani military said they are working to resolve the issue.



Last week, Zardari said Pakistan would not allow foreign nations to violate its sovereignty to pursue terrorists.



"We will not tolerate the violation of our sovereignty and territorial integrity by any power in the name of combating terrorism," he said in his first speech to Parliament as president.



His remark followed a similar declaration from Pakistan's military chief, Gen. Parvez Kayani, who said this month that Pakistan's territorial integrity "will be defended at all cost, and no external force is allowed to conduct operations."



A senior defense official in the Pentagon said the Pentagon is trying to determine the details of Thursday's incident.



"What we don't know if this was just a case of trigger-happy members of the Frontier Corps," the official said, "or whether in fact the Pakistani military does have orders to fire on our helicopters."



"We are confident our helicopters were on the Afghan side of the border, and we have no report they fired back," the official added.



Top U.S. commanders will be talking
Did anyone die? What was fired on by Pakistanis? Why did U.S. return fire? Who warned troops to stay out? What did the Pakistani president say they fired? Who fired at American copters? What are Pakistani and U.S. officials working on? What president warned foreign forces to stay out? Who claimed the military fired flares?
no shots Pakistani military fired shots at two American helicopters Pakistani military shots at two American helicopters Pakistani military resolve the issue. Asif Ali Zardari President Asif Ali Zardari
question: Did anyone die?, answer: no | question: What was fired on by Pakistanis?, answer: shots | question: Why did U.S. return fire?, answer: Pakistani military fired shots at two American helicopters | question: Who warned troops to stay out?, answer: Pakistani military | question: What did the Pakistani president say they fired?, answer: shots at two American helicopters | question: Who fired at American copters?, answer: Pakistani military | question: What are Pakistani and U.S. officials working on?, answer: resolve the issue. | question: What president warned foreign forces to stay out?, answer: Asif Ali Zardari | question: Who claimed the military fired flares?, answer: President Asif Ali Zardari